-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from ComposioHQ/kaavee/ci_chart
Add CI chart
- Loading branch information
Showing
4 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from crewai import Agent, Task, Crew | ||
from composio_crewai import ComposioToolSet | ||
from composio import App, Action | ||
from langchain_openai import ChatOpenAI | ||
|
||
llm = ChatOpenAI(model="gpt-4-turbo") | ||
|
||
while True: | ||
main_task = input("Enter the task you want to perform (or type 'exit' to quit): ") | ||
if main_task.lower() == 'exit': | ||
break | ||
|
||
code_interpreter_tools = ComposioToolSet().get_tools([App.CODEINTERPRETER]) | ||
|
||
code_interpreter_agent = Agent( | ||
role="Python Code Interpreter Agent", | ||
goal=f"""Run I a code to get acheive a task given by the user""", | ||
backstory="""You are an agent that helps users run Python code.""", | ||
verbose=True, | ||
tools=code_interpreter_tools, | ||
llm=llm, | ||
memory=True, | ||
) | ||
|
||
code_interpreter_task = Task( | ||
description=f"""Run Python code to get acheive a task - {main_task}""", | ||
expected_output=f"""Python code executed successfully. The result of the task is returned - {main_task}""", | ||
agent=code_interpreter_agent, | ||
) | ||
|
||
crew = Crew( | ||
agents=[code_interpreter_agent], | ||
tasks=[code_interpreter_task], | ||
memory=True, | ||
) | ||
|
||
result = crew.kickoff() | ||
print(result) | ||
|
||
|