You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# TaskMessages are messages that are sent between an Agent and a Client. They are fundamentally decoupled from messages sent to the LLM. This is because you may want to send additional metadata to allow the client to render the message on the UI differently.
# - If using multiple LLMs, but one LLM's output should not be sent to the user (i.e. a critic model), you can leverage the State as an internal storage mechanism to store the critic model's conversation history. This i s a powerful and flexible way to handle complex scenarios.
# The Agentex server automatically commits input and output messages to the database so you don't need to do this yourself, simply process the input content and return the output content.
# Initialize the provider and run config to allow for tracing
74
+
provider=SyncStreamingProvider(
75
+
trace_id=params.task.id,
76
+
)
86
77
87
-
# Call an LLM to respond to the user's message
78
+
# Initialize the run config to allow for tracing and streaming
79
+
run_config=RunConfig(
80
+
model_provider=provider,
81
+
)
88
82
89
-
print(f"Calling LLM with model {state.model} and messages {llm_messages}")
90
83
91
-
# The Agentex server automatically commits input and output messages to the database so you don't need to do this yourself, simply process the input content and return the output content.
0 commit comments