temperature config for expert

This commit is contained in:
Shivering Ocelot committed 2026-01-22 12:24:45 -05:00
1 parent 39fa4f1123
commit 26aa137c98
3 files changed
+34 -4

No files matched your search

+9 -1
View File
@@ -20,6 +20,7 @@ class ExpertAgent(Agent):
schema_fields = [
AgentField('system_prompt', 'string', default="You are an expert AI assistant."),
AgentField('model', 'model_id', default=None),
AgentField('temperature', 'number', default=None),
]
def __init__(self, app, data):
@@ -56,7 +57,14 @@ class ExpertAgent(Agent):
model_engine = db_model.value["engine"]
if model_engine == "llama-cpp":
response = await inference.local_chat_completion(self.app, messages, model=db_model.value['model'])
response = await inference.local_chat_completion(
self.app,
messages,
model=db_model.value['model'],
opts={
'temperature':self.config.get('temperature')
}
)
elif model_engine == "replicate":
response = await inference.replicate_llama_completion(self.app, messages, model=db_model.value['model'])
else: