Skip to content

Parameter control of chained llm and retriever from Gradio interface #30836

Closed Answered by mghiasvand1
SwHaraday asked this question in Q&A
Discussion options

You must be logged in to vote

@SwHaraday, there were a few small bugs in my previous comment, so disregard it and consider this one instead. I have updated the code. After defining your index variable as your vector store and setting the model_path and QUESTION_PROMPT variables, running the code below will likely resolve the issue of the two mentioned hyperparameters not updating within your interface. What has been done is that the llm and retriever are initialized outside the chat function. Inside the chat function, the temperature of the llm is set first, followed by the score threshold of the retriever. Finally, the chain is created based on this updated llm and retriever, followed by the invocation.

TEMPERATURE = 0…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@SwHaraday
Comment options

@mghiasvand1
Comment options

Answer selected by SwHaraday
@SwHaraday
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants