Spaces:
Runtime error
Runtime error
UPDATE
Browse files
src/components/ragAgent.py
CHANGED
|
@@ -45,7 +45,7 @@ class RAGAgent:
|
|
| 45 |
retriever = vectorStore.as_retriever(search_kwargs = {"k": 5})
|
| 46 |
llm = ChatCerebras(
|
| 47 |
model = config.get("RAGAGENT", "modelName"),
|
| 48 |
-
temperature = config.
|
| 49 |
max_tokens = config.getint("RAGAGENT", "maxTokens")
|
| 50 |
)
|
| 51 |
chain = {"query": RunnablePassthrough(), "context": RunnablePassthrough() | retriever} | promptTemplate | llm | StrOutputParser()
|
|
|
|
| 45 |
retriever = vectorStore.as_retriever(search_kwargs = {"k": 5})
|
| 46 |
llm = ChatCerebras(
|
| 47 |
model = config.get("RAGAGENT", "modelName"),
|
| 48 |
+
temperature = config.getfloat("RAGAGENT", "temperature"),
|
| 49 |
max_tokens = config.getint("RAGAGENT", "maxTokens")
|
| 50 |
)
|
| 51 |
chain = {"query": RunnablePassthrough(), "context": RunnablePassthrough() | retriever} | promptTemplate | llm | StrOutputParser()
|
src/components/reasoningAgent.py
CHANGED
|
@@ -17,7 +17,7 @@ class ReasoningAgent:
|
|
| 17 |
promptTemplate = ChatPromptTemplate.from_template(prompts.get("reasoningTemplate"))
|
| 18 |
llm = ChatCerebras(
|
| 19 |
model = config.get("REASONINGAGENT", "modelName"),
|
| 20 |
-
temperature = config.
|
| 21 |
)
|
| 22 |
chain = {"query": RunnablePassthrough()} | promptTemplate | llm | StrOutputParser()
|
| 23 |
self.chain = chain
|
|
|
|
| 17 |
promptTemplate = ChatPromptTemplate.from_template(prompts.get("reasoningTemplate"))
|
| 18 |
llm = ChatCerebras(
|
| 19 |
model = config.get("REASONINGAGENT", "modelName"),
|
| 20 |
+
temperature = config.getfloat("REASONINGAGENT", "temperature")
|
| 21 |
)
|
| 22 |
chain = {"query": RunnablePassthrough()} | promptTemplate | llm | StrOutputParser()
|
| 23 |
self.chain = chain
|
src/components/sqlAgent.py
CHANGED
|
@@ -22,7 +22,7 @@ class PostgreSQLAgent:
|
|
| 22 |
db = SQLDatabase(self.engine)
|
| 23 |
llm = ChatCerebras(
|
| 24 |
model = self.config.get("SQLAGENT", "modelName"),
|
| 25 |
-
temperature = self.config.
|
| 26 |
max_tokens = self.config.getint("SQLAGENT", "maxTokens")
|
| 27 |
)
|
| 28 |
self.toolkit = SQLDatabaseToolkit(db = db, llm = llm)
|
|
|
|
| 22 |
db = SQLDatabase(self.engine)
|
| 23 |
llm = ChatCerebras(
|
| 24 |
model = self.config.get("SQLAGENT", "modelName"),
|
| 25 |
+
temperature = self.config.getfloat("SQLAGENT", "temperature"),
|
| 26 |
max_tokens = self.config.getint("SQLAGENT", "maxTokens")
|
| 27 |
)
|
| 28 |
self.toolkit = SQLDatabaseToolkit(db = db, llm = llm)
|
src/components/synthesizerAgent.py
CHANGED
|
@@ -17,7 +17,7 @@ class SynthesizerAgent:
|
|
| 17 |
promptTemplate = ChatPromptTemplate.from_template(prompts.get("synthesizerTemplate"))
|
| 18 |
llm = ChatCerebras(
|
| 19 |
model = config.get("SYNTHESIZERAGENT", "modelName"),
|
| 20 |
-
temperature = config.
|
| 21 |
max_tokens = config.getint("SYNTHESIZERAGENT", "maxTokens")
|
| 22 |
)
|
| 23 |
chain = RunnablePassthrough() | promptTemplate | llm | StrOutputParser()
|
|
|
|
| 17 |
promptTemplate = ChatPromptTemplate.from_template(prompts.get("synthesizerTemplate"))
|
| 18 |
llm = ChatCerebras(
|
| 19 |
model = config.get("SYNTHESIZERAGENT", "modelName"),
|
| 20 |
+
temperature = config.getfloat("SYNTHESIZERAGENT", "temperature"),
|
| 21 |
max_tokens = config.getint("SYNTHESIZERAGENT", "maxTokens")
|
| 22 |
)
|
| 23 |
chain = RunnablePassthrough() | promptTemplate | llm | StrOutputParser()
|