onuratakan / gpt-computer-assistant

gpt-4o for windows, macos and linux
MIT License
4.75k stars 441 forks source link

Any full tutorial to show how to implement crewAI agent with Tools in GPT computer assistant ? #106

Open Adamchanadam opened 3 weeks ago

Adamchanadam commented 3 weeks ago

as title. thank you .

onuratakan commented 3 weeks ago

Hi, realy good point.

from gpt_computer_assistant import Agent, Tool, start

manager = Agent(
  role='Project Manager',
  goal='understands project needs and assist coder',
  backstory="""You're a manager at a large company.""",
)

coder = Agent(
  role='Senior Python Coder',
  goal='writing python scripts and copying to clipboard',
  backstory="""You're a python developer at a large company.""",
)

@Tool
def sum_tool(first_number: int, second_number: int) -> str:
    """Useful for when you need to sum two numbers together."""
    return first_number + second_number

start()
onuratakan commented 3 weeks ago

Do you need any specific argument from original crewai functions

Adamchanadam commented 3 weeks ago

Do you need any specific argument from original crewai functions

Thanks for reply . According to the practice of CrewAI , after defined Agents & Tools , where can I define "Task" ?

Adamchanadam commented 3 weeks ago

according to this example , should the 'manager' or 'coder' may use the 'sum_tool' ? Is there a 'sequential' concept , the first Agent's output can be used by the next Agent ?

Hi, realy good point.

from gpt_computer_assistant import Agent, Tool, start

manager = Agent(
  role='Project Manager',
  goal='understands project needs and assist coder',
  backstory="""You're a manager at a large company.""",
)

coder = Agent(
  role='Senior Python Coder',
  goal='writing python scripts and copying to clipboard',
  backstory="""You're a python developer at a large company.""",
)

@Tool
def sum_tool(first_number: int, second_number: int) -> str:
    """Useful for when you need to sum two numbers together."""
    return first_number + second_number

start()
onuratakan commented 3 weeks ago

Do you need any specific argument from original crewai functions

Thanks for reply . According to the practice of CrewAI , after defined Agents & Tools , where can I define "Task" ?

Actualy your inputs (record, screenshot, typing) are tasks.

Adamchanadam commented 3 weeks ago

On the other hand , when I ran the code with Agent and Tool above via main.py , it usually can be executed correctly at the first time. but after finished the TTS and I ask another question . it always show :

Moving to Agentic
Error in process_audio 'Agent' object is not subscriptable
Updating from thread EXCEPTION: 'Agent' object is not subscriptable
State updated: idle