cleanup self.max_loops issue

pull/846/head^2
Kye Gomez 4 weeks ago
parent 48e7fd8a79
commit ea9ecd56da

@ -6,13 +6,13 @@
## Important Note on Model Names ## Important Note on Model Names
!!! warning "Required Format" !!! warning "Required Format"
When specifying a model in Swarms, you must use the format `provider/model_name`. For example: When specifying a model in an agent, you must use the format `provider/model_name`. For example:
```python ```python
"openai/gpt-4" "openai/gpt-4"
"anthropic/claude-3-opus-latest" "anthropic/claude-3-opus-latest"
"cohere/command-r-plus" "cohere/command-r-plus"
``` ```
This format ensures Swarms knows which provider to use for the specified model. This format ensures the agent knows which provider to use for the specified model.
## Available Model Providers ## Available Model Providers
@ -79,12 +79,12 @@
- `mistral-small` - `mistral-small`
- `mistral-medium` - `mistral-medium`
## Using Different Models with Swarms ## Using Different Models In Your Agents
To use a different model with your Swarms agent, specify the model name in the `model_name` parameter when initializing the Agent, using the provider/model_name format: To use a different model with your Swarms agent, specify the model name in the `model_name` parameter when initializing the Agent, using the provider/model_name format:
```python ```python
from swarms.structs.agent import Agent from swarms import Agent
# Using OpenAI's GPT-4 # Using OpenAI's GPT-4
agent = Agent( agent = Agent(

File diff suppressed because it is too large Load Diff

@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry] [tool.poetry]
name = "swarms" name = "swarms"
version = "7.7.6" version = "7.7.7"
description = "Swarms - TGSC" description = "Swarms - TGSC"
license = "MIT" license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"] authors = ["Kye Gomez <kye@apac.ai>"]

@ -562,7 +562,7 @@ class Agent:
if self.react_on is True: if self.react_on is True:
self.system_prompt += REACT_SYS_PROMPT self.system_prompt += REACT_SYS_PROMPT
if len(self.max_loops) > 1: if self.max_loops > 1:
self.system_prompt += generate_reasoning_prompt( self.system_prompt += generate_reasoning_prompt(
self.max_loops self.max_loops
) )
@ -1044,7 +1044,7 @@ class Agent:
): ):
loop_count += 1 loop_count += 1
if len(self.max_loops) > 1: if self.max_loops > 1:
self.short_memory.add( self.short_memory.add(
role=self.agent_name, role=self.agent_name,
content=f"Current Internal Reasoning Loop: {loop_count}/{self.max_loops}", content=f"Current Internal Reasoning Loop: {loop_count}/{self.max_loops}",

Loading…
Cancel
Save