From f999f6942a9c06908ecce4f3f8498a341c039135 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 9 Jan 2025 19:00:04 -0500 Subject: [PATCH] [DOCS][Cohere Example] --- docs/swarms/examples/claude.md | 1 - docs/swarms/examples/cohere.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docs/swarms/examples/cohere.md diff --git a/docs/swarms/examples/claude.md b/docs/swarms/examples/claude.md index 5890c4fc6..4ed443ff4 100644 --- a/docs/swarms/examples/claude.md +++ b/docs/swarms/examples/claude.md @@ -18,7 +18,6 @@ agent = Agent( system_prompt="Agent system prompt here", agent_description="Agent performs financial analysis.", llm=model, - long_term_memory=chromadb_memory, ) # Run a query diff --git a/docs/swarms/examples/cohere.md b/docs/swarms/examples/cohere.md new file mode 100644 index 000000000..6f7d8acf0 --- /dev/null +++ b/docs/swarms/examples/cohere.md @@ -0,0 +1,25 @@ +# Agent with Cohere + +- Add your `COHERE_API_KEY` in the `.env` file +- Select your model_name like `command-r` follows LiteLLM conventions + + +```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="command-r", + system_prompt="Agent system prompt here", + agent_description="Agent performs financial analysis.", + llm=model, +) + +# Run a query +agent.run("What are the components of a startup's stock incentive equity plan?") +``` \ No newline at end of file