Changelog
Added
-
ConversationsGeneratorConfig Class
- Added new attribute
llm_type
to specify the type of language model to use. This allows users to choose between'openai'
or'huggingface'
based on their requirements. - Added new attribute
repo_id
to specify the ID for the HuggingFace model to use. This will only be used ifllm_type
is set to'huggingface'
.
- Added new attribute
-
ConversationsGenerator Class
- Modified the
initialize_chain
function to create the correct language model based on thellm_type
field of theConversationsGeneratorConfig
object. Ifllm_type
is set to'openai'
, it initializes an OpenAI language model, and if it's set to'huggingface'
, it initializes a HuggingFace model using therepo_id
provided.
- Modified the
Changes
- Language Model Initialization
- The language model initialization has been made flexible, allowing users to choose between OpenAI and HuggingFace language models based on their preference. The HuggingFace model allows users to select from a wide variety of models hosted on the HuggingFace Model Hub.
Improvements
-
Conversational AI Flexibility
- The changes allow users to switch between different types of language models, thus adding flexibility and diversity to the Conversational AI scenarios that they can generate. They can now utilize any model from the extensive HuggingFace Model Hub or stick with the OpenAI models.
-
Code Modularity
- By allowing the selection of language model type during the initialization of the conversation chain, the code has become more modular and easier to extend in the future. The same pattern can be used to integrate more language model types if needed.
-
Usage Clarity
- The addition of the
llm_type
attribute makes it clearer for the user which language model is being used for conversation generation.
- The addition of the