Upsonic / gpt-computer-assistant

Intelligence development framework in python for your product like Apple Intelligence
https://GCA.dev
MIT License
5.24k stars 486 forks source link

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

Open Adamchanadam opened 4 months ago

Adamchanadam commented 4 months ago

as title. thank you .

onuratakan commented 4 months 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 4 months ago

Do you need any specific argument from original crewai functions

Adamchanadam commented 4 months 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 4 months 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 4 months 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 4 months 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