From e15bd0628b29c7c71f92bc67bd48d23602b4faa9 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 9 Jan 2025 19:03:55 -0500 Subject: [PATCH] [DOCS][Model Examples] --- docs/swarms/examples/claude.md | 1 + docs/swarms/examples/cohere.md | 1 + docs/swarms/examples/deepseek.md | 2 ++ docs/swarms/examples/groq.md | 1 + docs/swarms/examples/ollama.md | 24 ++++++++++++++++++++++++ docs/swarms/examples/openai_example.md | 3 +++ 6 files changed, 32 insertions(+) create mode 100644 docs/swarms/examples/ollama.md diff --git a/docs/swarms/examples/claude.md b/docs/swarms/examples/claude.md index a1c4fde0..75cb85c8 100644 --- a/docs/swarms/examples/claude.md +++ b/docs/swarms/examples/claude.md @@ -1,6 +1,7 @@ # Agent with Anthropic/Claude - Get their api keys and put it in the `.env` + - Select your model_name like `claude-3-sonnet-20240229` follows LiteLLM conventions diff --git a/docs/swarms/examples/cohere.md b/docs/swarms/examples/cohere.md index ee6ad392..9f2a0eb9 100644 --- a/docs/swarms/examples/cohere.md +++ b/docs/swarms/examples/cohere.md @@ -1,6 +1,7 @@ # Agent with Cohere - Add your `COHERE_API_KEY` in the `.env` file + - Select your model_name like `command-r` follows LiteLLM conventions diff --git a/docs/swarms/examples/deepseek.md b/docs/swarms/examples/deepseek.md index 418fdf34..7b4769b2 100644 --- a/docs/swarms/examples/deepseek.md +++ b/docs/swarms/examples/deepseek.md @@ -1,7 +1,9 @@ # Agent with DeepSeek - Add your `DEEPSEEK_API_KEY` in the `.env` file + - Select your model_name like `deepseek/deepseek-chat` follows [LiteLLM conventions](https://docs.litellm.ai/docs/providers/deepseek) + - Execute your agent! diff --git a/docs/swarms/examples/groq.md b/docs/swarms/examples/groq.md index 928a9290..d9dd23a2 100644 --- a/docs/swarms/examples/groq.md +++ b/docs/swarms/examples/groq.md @@ -1,5 +1,6 @@ # Agent with Groq +- Add your `GROQ_API_KEY` ```python import os diff --git a/docs/swarms/examples/ollama.md b/docs/swarms/examples/ollama.md new file mode 100644 index 00000000..9e019167 --- /dev/null +++ b/docs/swarms/examples/ollama.md @@ -0,0 +1,24 @@ +# Agent with Ollama + +- No API key needed +- Select your model_name like `ollama/llama2` follows [LiteLLM conventions](https://docs.litellm.ai/docs/providers/ollama) + + +```python +from swarms import Agent +import os +from dotenv import load_dotenv + +load_dotenv() + +# Initialize the agent with ChromaDB memory +agent = Agent( + agent_name="Financial-Analysis-Agent", + model_name="ollama/llama2", + system_prompt="Agent system prompt here", + agent_description="Agent performs financial analysis.", +) + +# Run a query +agent.run("What are the components of a startup's stock incentive equity plan?") +``` \ No newline at end of file diff --git a/docs/swarms/examples/openai_example.md b/docs/swarms/examples/openai_example.md index 0741a120..181c0039 100644 --- a/docs/swarms/examples/openai_example.md +++ b/docs/swarms/examples/openai_example.md @@ -1,5 +1,8 @@ # Agent with GPT-4o-Mini +- Add `OPENAI_API_KEY="your_key"` to your `.env` file +- Select your model like `gpt-4o-mini` or `gpt-4o` + ```python from swarms import Agent