Skip to content

Commit e8a3627

Browse files
committed
Update examples
1 parent 9a57d0a commit e8a3627

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

bindings/ceylon/tests/tasks/article-writer-agents-gen-with-tools-openai.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from loguru import logger
1111

1212
from ceylon.task import Task
13-
from ceylon.llm import LLMTaskAgent, LLMTaskManager
1413

1514

1615
class QueryInput(BaseModel):

bindings/ceylon/tests/tasks/article-writer-agents.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from langchain_community.chat_models import ChatOllama
2+
from langchain_openai import ChatOpenAI
23

34
from ceylon.task import Task, SubTask
4-
from ceylon.llm import LLMTaskOperator,LLMTaskCoordinator
5+
from ceylon.llm import LLMTaskOperator, LLMTaskCoordinator
56

67
# Example usage
78
if __name__ == "__main__":
@@ -26,7 +27,11 @@
2627
article_task
2728
]
2829

29-
llm = ChatOllama(model="llama3.1:latest", temperature=0)
30+
llm = ChatOpenAI(
31+
base_url='http://localhost:11434/v1',
32+
api_key='ollama', # required, but unused
33+
model_name='llama3.1:latest'
34+
)
3035

3136
# Create specialized agents
3237
agents = [
@@ -63,7 +68,8 @@
6368
)
6469
]
6570

66-
task_manager = LLMTaskCoordinator(tasks, agents, llm=llm)
71+
task_manager = LLMTaskCoordinator(tasks, agents, llm=llm, context="You team is working to write an article",
72+
team_goal="Write quickly and accurately")
6773
tasks = task_manager.do(inputs=b"")
6874

6975
for t in tasks:

0 commit comments

Comments
 (0)