Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
61 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
""" | ||
Azure Openai configuration wrapper | ||
AzureOpenAI Module | ||
""" | ||
from langchain_openai import AzureChatOpenAI | ||
|
||
|
||
class AzureOpenAI(AzureChatOpenAI): | ||
"""Class for wrapping openai module""" | ||
""" | ||
A wrapper for the AzureChatOpenAI class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
|
||
def __init__(self, llm_config: dict): | ||
""" | ||
A wrapper for the ChatOpenAI class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
# Initialize the superclass (AzureChatOpenAI) with provided config parameters | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
""" | ||
Gemini module configuration | ||
Gemini Module | ||
""" | ||
from langchain_google_genai import ChatGoogleGenerativeAI | ||
|
||
|
||
class Gemini(ChatGoogleGenerativeAI): | ||
"""Class for wrapping gemini module""" | ||
""" | ||
A wrapper for the Gemini class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
def __init__(self, llm_config: dict): | ||
""" | ||
A wrapper for the Gemini class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model (e.g., model="gemini-pro") | ||
""" | ||
|
||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
such as model="gemini-pro" and api_key | ||
""" | ||
# Initialize the superclass (ChatOpenAI) with provided config parameters | ||
def __init__(self, llm_config: dict): | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
""" | ||
Groq module configuration | ||
Groq Module | ||
""" | ||
|
||
from langchain_groq import ChatGroq | ||
|
||
|
||
class Groq(ChatGroq): | ||
"""Class for wrapping Groq module""" | ||
""" | ||
A wrapper for the Groq class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
def __init__(self, llm_config: dict): | ||
""" | ||
A wrapper for the Groq class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model (e.g., model="llama3-70b-8192") | ||
""" | ||
|
||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
such as model="llama3-70b-8192" and api_key | ||
""" | ||
# Initialize the superclass (ChatOpenAI) with provided config parameters | ||
def __init__(self, llm_config: dict): | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
""" | ||
Module for implementing the hugginface class | ||
HuggingFace Module | ||
""" | ||
from langchain_community.chat_models.huggingface import ChatHuggingFace | ||
|
||
|
||
class HuggingFace(ChatHuggingFace): | ||
"""Provides a convenient wrapper for interacting with Hugging Face language models | ||
designed for conversational AI applications. | ||
""" | ||
A wrapper for the HuggingFace class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): A configuration dictionary containing: | ||
* api_key (str, optional): Your Hugging Face API key. | ||
* model_name (str): The name of the Hugging Face LLM to load. | ||
* tokenizer_name (str, optional): Name of the corresponding tokenizer. | ||
* device (str, optional): Device for running the model ('cpu' by default). | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
|
||
def __init__(self, llm_config: dict): | ||
"""Initializes the HuggingFace chat model wrapper""" | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
""" | ||
openai configuration wrapper | ||
Ollama Module | ||
""" | ||
from langchain_community.chat_models import ChatOllama | ||
|
||
|
||
class Ollama(ChatOllama): | ||
"""Class for wrapping ollama module""" | ||
""" | ||
A wrapper for the ChatOllama class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
def __init__(self, llm_config: dict): | ||
""" | ||
A wrapper for the ChatOllama class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
|
||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
# Initialize the superclass (ChatOllama) with provided config parameters | ||
def __init__(self, llm_config: dict): | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
""" | ||
openai configuration wrapper | ||
OpenAI Module | ||
""" | ||
from langchain_openai import ChatOpenAI | ||
|
||
|
||
class OpenAI(ChatOpenAI): | ||
"""Class for wrapping openai module""" | ||
""" | ||
A wrapper for the ChatOpenAI class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
def __init__(self, llm_config: dict): | ||
""" | ||
A wrapper for the ChatOpenAI class that provides default configuration | ||
and could be extended with additional methods if needed. | ||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
|
||
Args: | ||
llm_config (dict): Configuration parameters for the language model. | ||
""" | ||
# Initialize the superclass (ChatOpenAI) with provided config parameters | ||
def __init__(self, llm_config: dict): | ||
super().__init__(**llm_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters