From ad41065b03d656e43eb32e78bef998352e9f7762 Mon Sep 17 00:00:00 2001 From: Tony Kipkemboi Date: Fri, 1 Nov 2024 15:58:36 -0400 Subject: [PATCH] Update docs (#1550) * add llm providers accordion group * fix numbering * Fix directory tree & add llms to accordion --- docs/concepts/flows.mdx | 26 ++++++++++++++------------ docs/concepts/llms.mdx | 26 +++++++++++++++++--------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/docs/concepts/flows.mdx b/docs/concepts/flows.mdx index c86776982..e3f0e6b45 100644 --- a/docs/concepts/flows.mdx +++ b/docs/concepts/flows.mdx @@ -577,18 +577,20 @@ This command will create a new directory for your crew within the `crews` folder After adding a new crew, your folder structure will look like this: -name_of_flow/ -├── crews/ -│ ├── poem_crew/ -│ │ ├── config/ -│ │ │ ├── agents.yaml -│ │ │ └── tasks.yaml -│ │ └── poem_crew.py -│ └── name_of_crew/ -│ ├── config/ -│ │ ├── agents.yaml -│ │ └── tasks.yaml -│ └── name_of_crew.py +| Directory/File | Description | +| :--------------------- | :----------------------------------------------------------------- | +| `name_of_flow/` | Root directory for the flow. | +| ├── `crews/` | Contains directories for specific crews. | +| │ ├── `poem_crew/` | Directory for the "poem_crew" with its configurations and scripts. | +| │ │ ├── `config/` | Configuration files directory for the "poem_crew". | +| │ │ │ ├── `agents.yaml` | YAML file defining the agents for "poem_crew". | +| │ │ │ └── `tasks.yaml` | YAML file defining the tasks for "poem_crew". | +| │ │ └── `poem_crew.py` | Script for "poem_crew" functionality. | +| └── `name_of_crew/` | Directory for the new crew. | +| ├── `config/` | Configuration files directory for the new crew. | +| │ ├── `agents.yaml` | YAML file defining the agents for the new crew. | +| │ └── `tasks.yaml` | YAML file defining the tasks for the new crew. | +| └── `name_of_crew.py` | Script for the new crew functionality. | You can then customize the `agents.yaml` and `tasks.yaml` files to define the agents and tasks for your new crew. The `name_of_crew.py` file will contain the crew's logic, which you can modify to suit your needs. diff --git a/docs/concepts/llms.mdx b/docs/concepts/llms.mdx index 835c2491f..d432070d4 100644 --- a/docs/concepts/llms.mdx +++ b/docs/concepts/llms.mdx @@ -131,7 +131,6 @@ These are examples of how to configure LLMs for your agent. llm = LLM( model="cerebras/llama-3.1-70b", - base_url="https://api.cerebras.ai/v1", api_key="your-api-key-here" ) agent = Agent(llm=llm, ...) @@ -166,7 +165,6 @@ These are examples of how to configure LLMs for your agent. llm = LLM( model="groq/llama3-8b-8192", - base_url="https://api.groq.com/openai/v1", api_key="your-api-key-here" ) agent = Agent(llm=llm, ...) @@ -180,21 +178,18 @@ These are examples of how to configure LLMs for your agent. llm = LLM( model="anthropic/claude-3-5-sonnet-20241022", - base_url="https://api.anthropic.com/v1", api_key="your-api-key-here" ) agent = Agent(llm=llm, ...) ``` - - + ```python Code from crewai import LLM llm = LLM( - model="fireworks/meta-llama-3.1-8b-instruct", - base_url="https://api.fireworks.ai/inference/v1", + model="fireworks_ai/accounts/fireworks/models/llama-v3-70b-instruct", api_key="your-api-key-here" ) agent = Agent(llm=llm, ...) @@ -207,8 +202,7 @@ These are examples of how to configure LLMs for your agent. from crewai import LLM llm = LLM( - model="gemini/gemini-1.5-flash", - base_url="https://api.gemini.google.com/v1", + model="gemini/gemini-1.5-pro-002", api_key="your-api-key-here" ) agent = Agent(llm=llm, ...) @@ -242,6 +236,20 @@ These are examples of how to configure LLMs for your agent. agent = Agent(llm=llm, ...) ``` + + + + ```python Code + from crewai import LLM + + llm = LLM( + model="huggingface/meta-llama/Meta-Llama-3.1-8B-Instruct", + api_key="your-api-key-here", + base_url="your_api_endpoint" + ) + agent = Agent(llm=llm, ...) + ``` + ## Changing the Base API URL