53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
# Simple LangGraph Example - Actor-First Version
|
|
# Demonstrates basic LangGraph functionality with actors
|
|
|
|
agents:
|
|
assistant:
|
|
type: llm
|
|
config:
|
|
# Use actor instead of provider/model
|
|
actor: openai/gpt-3.5-turbo
|
|
temperature: 0.7
|
|
system_prompt: "You are a helpful assistant."
|
|
|
|
# Unified routes section with actor-first approach
|
|
routes:
|
|
# Define the graph as a route
|
|
simple_chat:
|
|
type: graph
|
|
entry_point: start
|
|
|
|
nodes:
|
|
# Process user input
|
|
process_input:
|
|
type: agent
|
|
agent: assistant
|
|
|
|
edges:
|
|
- source: start
|
|
target: process_input
|
|
- source: process_input
|
|
target: end
|
|
|
|
# Input stream that triggers the graph
|
|
chat_input:
|
|
type: stream
|
|
stream_type: cold
|
|
operators:
|
|
- type: graph_execute
|
|
params:
|
|
graph: simple_chat
|
|
publications:
|
|
- __output__
|
|
|
|
# Route input to the stream
|
|
merges:
|
|
- sources: [__input__]
|
|
target: chat_input
|
|
|
|
context:
|
|
global:
|
|
app_name: "Simple LangGraph Chat"
|
|
# Actor-specific configuration
|
|
default_actor: openai/gpt-3.5-turbo
|
|
enable_actor_fallback: true |