README.md in ruby-openai-swarm-0.4.0.1 vs README.md in ruby-openai-swarm-0.4.0.2
- old
+ new
@@ -14,11 +14,11 @@
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Bundler](#bundler)
- [Gem install](#gem-install)
- [Logger](#logger)
- - [examples](#examples)
+ - [Quick start](#quick-start)
- [Documentation](#documentation)
## quick show
https://github.com/user-attachments/assets/ed84ef83-5ccb-4223-abb8-933d0ec66468
@@ -84,11 +84,11 @@
def spanish_agent
OpenAISwarm::Agent.new(
name: "Spanish Agent",
instructions: "You only speak Spanish.",
- model: "gpt-4o-mini"
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL']
)
end
transfer_to_spanish_agent = OpenAISwarm::FunctionDescriptor.new(
target_method: :spanish_agent,
@@ -96,11 +96,11 @@
)
english_agent = OpenAISwarm::Agent.new(
name: "English Agent",
instructions: "You only speak English.",
- model: "gpt-4o-mini",
+ model: ENV['SWARM_AGENT_DEFAULT_MODEL'],
functions: [transfer_to_spanish_agent]
)
messages = [{"role": "user", "content": "Hola. ¿Como estás?"}]
response = client.run(agent: english_agent, messages: messages, debug: true)
@@ -125,22 +125,37 @@
# config.logger = Logger.new(Rails.root.join('log', 'openai_swarm.log'))
# config.logger = Rails.configuration.lograge.logger
end
```
-# Examples
+## Quick Start
-Setting ACCESS_TOKEN for AI Providers in examples
+### Choose the default model name
+`export SWARM_AGENT_DEFAULT_MODEL=gpt-4o-mini`
+
+or
+
+`export SWARM_AGENT_DEFAULT_MODEL=deepseek-chat`
+
+DeepSeek V3 is 1/10 price of gpt-4o-mini, so try it!
+
+
+### Setting ACCESS_TOKEN for AI Providers in examples
+
- For OpenRouter:
`OPEN_ROUTER_ACCESS_TOKEN=cxxxxx` or `export OPEN_ROUTER_ACCESS_TOKEN=cxxxxx`
- For OpenAI:
`OPENAI_ACCESS_TOKEN=cxxxxx` or `export OPENAI_ACCESS_TOKEN=cxxxxx`
-Check out `/examples` for inspiration! Learn more about each one in its README.
+- For DeepSeek:
+
+ `DEEPSEEK_ACCESS_TOKEN=cxxxxx` or `export DEEPSEEK_ACCESS_TOKEN=cxxxxx`
+
+### Check out `/examples` for inspiration! Learn more about each one in its README.
- [X] [`basic`](examples/basic): Simple examples of fundamentals like setup, function calling, handoffs, and context variables
- running: `ruby examples/basic/agent_handoff.rb`
- running: `ruby examples/basic/bare_minimum.rb`
- running: `ruby examples/basic/context_variables.rb`