Closed pencilvania closed 4 days ago
looking at documentation I guess you can run it by running a docker container
docker pull hlohaus789/g4f
docker run -p 8080:8080 -p 1337:1337 -p 7900:7900 --shm-size="2g" hlohaus789/g4f:latest
it exposes an api for you
http://localhost:1337/v1
and you can use this api with openAi lib
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
openai_api_base="http://localhost:1337/v1",
openai_api_key="anything_noneeded",
model_name="gpt-3.5-turbo"
)
...
# code of your agents
Agent(
role='your role',
goal='your goal.',
verbose=True,
backstory="""your backstory""",
allow_delegation=True,
llm=llm,
)
Pass llm to your agents and it will work
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Hi Guys
I added gpt4free (import g4f) https://github.com/xtekky/gpt4free and using it , but the problem is when I want using tools like WebsiteSearchTool it seems need to OPENAI_API_KEY when we are using even llm can it be integrated ?