-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rate Limiter, Models, Langchain update (#7)
* Update various package versions * Update splitter modules * Use updated langchain document loaders. * Address relative import statement. * Adding langchain-chroma dependency. * Refer to update langchain-chroma module. * Refer to updated langchain openai package. * Refer to updated embedding modules. * Unit test based corrections; now using current Langchain embeddings and vector store. * Argument not optional. * Gitignore aider folder. * Updated langchain references. * Use community Replicate model. * Update replicate based model. * New langchain packages for hugging face. * Adding Gemini LLM * Adding mistral LLM. * Adding LiteLLM * Setup anthropic through LiteLLM. * Adding Claud 3 * New chat function using Langchain Expression Language. But issues (related to embedding+source reference in output). * Include RAG source reference in MD, HTML and logging output. (This is different with LCEL changes). * Update poetry packages * Remove model kwargs from embedding settings. * Remove chat function version no longer used. * Add in settings update * Update import from quke (instead of .) * Adding basic rate limiting functionality. * Adding LLM rate limiter functionality based on Langchain rate limiter. * Config update * Removing debug code. * Removing old code. * Removing debug code. Adding rate limiter to Gemini. * Logging messages. * Expand rate_limit config settings. * Summary description update. --------- Co-authored-by: Erik Oosterop <[email protected]>
- Loading branch information
1 parent
42e2c29
commit 0424c84
Showing
25 changed files
with
4,347 additions
and
1,612 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
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 |
---|---|---|
|
@@ -174,3 +174,4 @@ DEL_setup.py | |
readme - SAMPLE.md | ||
quke/temp.yaml | ||
quke/wip.py | ||
.aider* |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
module_name_llm: langchain.llms | ||
class_name_llm: HuggingFaceHub | ||
module_name_llm: langchain_huggingface | ||
class_name_llm: HuggingFaceEndpoint | ||
name: tiiuae/falcon-7b-instruct | ||
|
||
# rate_limiter is optional. If it exists it needs to refer to a limiter defined in config.yaml. | ||
rate_limiter: none | ||
|
||
llm_args: | ||
repo_id: ${llm.name} | ||
temperature: 0.1 | ||
max_new_tokens: 512 | ||
model_kwargs: | ||
max_length: 2000 | ||
temperature: 0.5 | ||
max_new_tokens: 200 | ||
num_return_sequences: 3 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module_name_llm: langchain_google_genai | ||
class_name_llm: ChatGoogleGenerativeAI | ||
name: gemini-1.5-pro | ||
|
||
# rate_limiter is optional. If it exists it needs to refer to a limiter defined in config.yaml. | ||
rate_limiter: gemini | ||
|
||
llm_args: | ||
model: ${llm.name} | ||
temperature: 0 |
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,8 +1,10 @@ | ||
#type: OpenAI #import OpenAI maybe needed to set the API key, though langchain may just take it from env? | ||
module_name_llm: langchain.chat_models | ||
module_name_llm: langchain_openai | ||
class_name_llm: ChatOpenAI | ||
name: gpt-4o-mini | ||
|
||
# rate_limiter is optional. If it exists it needs to refer to a limiter defined in config.yaml. | ||
rate_limiter: openai | ||
|
||
llm_args: | ||
model_name: ${llm.name} | ||
temperature: 0 |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module_name_llm: langchain_community.chat_models | ||
class_name_llm: ChatLiteLLM | ||
#name: anthropic/claude-3-5-sonnet-20240620 | ||
name: anthropic/claude-3 | ||
|
||
# rate_limiter is optional. If it exists it needs to refer to a limiter defined in config.yaml. | ||
rate_limiter: none | ||
|
||
llm_args: | ||
model_name: ${llm.name} | ||
temperature: 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module_name_llm: langchain_mistralai.chat_models | ||
class_name_llm: ChatMistralAI | ||
name: mistral-large-latest | ||
# mistral-large-2407 | ||
|
||
# rate_limiter is optional. If it exists it needs to refer to a limiter defined in config.yaml. | ||
rate_limiter: none | ||
|
||
llm_args: | ||
model: ${llm.name} | ||
temperature: 0 |
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
Oops, something went wrong.