New feature : LLM Selection by the user #1
Open
1hemmem wants to merge 5 commits intomahdjourOussama:masterfrom
Open
New feature : LLM Selection by the user #11hemmem wants to merge 5 commits intomahdjourOussama:masterfrom
1hemmem wants to merge 5 commits intomahdjourOussama:masterfrom
Conversation
mahdjourOussama
requested changes
Feb 15, 2025
Owner
mahdjourOussama
left a comment
There was a problem hiding this comment.
good job i will test it later and I will add the safeguards for API.
great job I have added some comments that you can take into consideration for future PRs
Owner
There was a problem hiding this comment.
@1hemmem its not a good practice to push env file even if the secret are not that useful
Owner
There was a problem hiding this comment.
the best practice is to ignore env file because further integration will requires API keys that we can include
|
|
||
| # Define a function to answer queries | ||
| def answer_question(question, docs) -> str: | ||
| def answer_question(question, docs, model) -> str: |
Owner
There was a problem hiding this comment.
good approach but this will raise error if the model value is empty and is not supported you need to ensure that the provided model is supported and It has default value
| """Send a conversation to the AI model and return the response.""" | ||
| try: | ||
| query, docs = request.question, request.docs | ||
| query, docs, model = request.question, request.docs, request.model |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this pull request I have added the ability to choose what Large Language Model we will use in all the workflow.
I have added 2 more LLMs: "deepseek-r1:1.5b" and "llama3.2:1b" as a strating point and tested them.
this is how the user will select in the ui:
and here is the result when I have tested it with deepseek-r1:1.5b (the tag is specail only for deepseek-r1 models):