mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 08:56:21 +02:00
LLM dynamic settings, using the llm-model and llm-rag-model paramters to a flow (#531)
* Ported LLMs to dynamic models
This commit is contained in:
parent
9a34ab1b93
commit
7a3bfad826
15 changed files with 266 additions and 143 deletions
|
|
@ -80,11 +80,6 @@ class LlmService(FlowProcessor):
|
|||
|
||||
try:
|
||||
|
||||
try:
|
||||
logger.debug(f"MODEL IS {flow('model')}")
|
||||
except:
|
||||
logger.debug(f"CAN'T GET MODEL")
|
||||
|
||||
request = msg.value()
|
||||
|
||||
# Sender-produced ID
|
||||
|
|
@ -96,8 +91,10 @@ class LlmService(FlowProcessor):
|
|||
flow=f"{flow.name}-{consumer.name}",
|
||||
).time():
|
||||
|
||||
model = flow("model")
|
||||
|
||||
response = await self.generate_content(
|
||||
request.system, request.prompt
|
||||
request.system, request.prompt, model
|
||||
)
|
||||
|
||||
await flow("response").send(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue