badhezi
ad7dc6acdb
All checks were successful
society-ai-hub-container-cache Actions Demo / build (push) Successful in 59s
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from crewai import Agent, LLM
|
|
from textwrap import dedent
|
|
|
|
# This is an example of how to define custom agents.
|
|
# You can define as many agents as you want.
|
|
# You can also define custom tasks in tasks.py
|
|
class CustomAgents:
|
|
def __init__(self):
|
|
self.OpenAILlama323 = LLM(
|
|
model="openai/llama-3.2-3B-instruct",
|
|
base_url='https://hub.societyai.com/models/llama-3-2-3b/openai/v1'
|
|
)
|
|
|
|
def agent_1_name(self):
|
|
return Agent(
|
|
role="Define agent 1 role here",
|
|
backstory=dedent(f"""Define agent 1 backstory here"""),
|
|
goal=dedent(f"""Define agent 1 goal here"""),
|
|
# tools=[tool_1, tool_2],
|
|
allow_delegation=False,
|
|
verbose=True,
|
|
llm=self.OpenAILlama323,
|
|
)
|
|
|
|
def agent_2_name(self):
|
|
return Agent(
|
|
role="Define agent 2 role here",
|
|
backstory=dedent(f"""Define agent 2 backstory here"""),
|
|
goal=dedent(f"""Define agent 2 goal here"""),
|
|
# tools=[tool_1, tool_2],
|
|
allow_delegation=False,
|
|
verbose=True,
|
|
llm=self.OpenAILlama323,
|
|
)
|