We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecd53ef commit f3b1af3Copy full SHA for f3b1af3
1 file changed
backend/app/rag/llms/dspy.py
@@ -31,8 +31,9 @@ def get_dspy_lm_by_llama_llm(llama_llm: BaseLLM) -> dspy.LM:
31
case "GenAI":
32
if "models/" in llama_llm.model:
33
# For Gemini
34
+ model_name = llama_llm.model.split("models/")[1]
35
return dspy.LM(
- model=f"gemini/{llama_llm.model.split("models/")[1]}",
36
+ model=f"gemini/{model_name}",
37
max_tokens=llama_llm._max_tokens,
38
api_key=llama_llm._client._api_client.api_key,
39
)
0 commit comments