2ce29092f5
CI / security (push) Successful in 33s
CI / unit_tests (push) Successful in 42s
CI / coverage (push) Successful in 46s
CI / typecheck (push) Successful in 1m1s
CI / lint (push) Successful in 1m1s
CI / dead_code (push) Successful in 1m5s
CI / build (push) Successful in 27s
This code adds documentation of a sample actor. ISSUES CLOSED: #1 Reviewed-on: #3 Reviewed-by: Luis Mendes <luis.mendes@cleverthis.com>
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
# Simple Graph Actor - Sequential Processing
|
|
# Demonstrates a simple 3-node graph with linear execution
|
|
|
|
name: local/proofreader
|
|
type: graph
|
|
description: Simple proofreader
|
|
version: "1.0.0"
|
|
|
|
# LLM model
|
|
provider: openai
|
|
model: gpt-3.5-turbo
|
|
|
|
# Graph topology
|
|
route:
|
|
nodes:
|
|
# Node 1: Extract text from document
|
|
- id: extractor
|
|
type: tool
|
|
name: extractor
|
|
description: Extracts text from various document formats
|
|
config:
|
|
tool_name: documents/extract_text
|
|
parameters:
|
|
formats:
|
|
- pdf
|
|
- docx
|
|
- txt
|
|
|
|
# Node 2: Analyze content
|
|
- id: proofreader
|
|
type: agent
|
|
name: Proofreader
|
|
description: Proofreads a document.
|
|
config:
|
|
model: gpt-3.5-turbo
|
|
prompt: |
|
|
You are an expert proofreader. Read the given text and correct:
|
|
- misspellings
|
|
- incorrect grammar
|
|
- incorrect punctuation
|
|
- incorrect capitalization
|
|
- duplicate words
|
|
- misplaced modifiers
|
|
|
|
Provide constructive feedback with specific suppestions for improvement.
|
|
|
|
# Linear edges
|
|
edges:
|
|
- from_node: extractor
|
|
to_node: proofreader
|
|
|
|
# Entry and exit
|
|
entry_node: extractor
|
|
exit_nodes:
|
|
- proofreader
|
|
|
|
# Context settings
|
|
context_view: executor
|
|
memory:
|
|
enabled: true
|
|
max_messages: 10
|
|
|
|
context:
|
|
max_context_tokens: 4000
|