-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Required prerequisites
- I have read the documentation https://camel-ai.github.io/camel/camel.html.
- I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- Consider asking first in a Discussion.
What version of camel are you using?
0.2.36
System information
I put the camel source code in my own project directory
Problem description
Agent can't retrieve the system_msg, when the length of 'record_dicts' exceed the window_size.
e.g. In the example code , I think the proper reply should always be 'OK' if the system message is delivered correctly.
Reproducible example code
The Python snippets:
from camel.societies.workforce import Workforce
import os
from getpass import getpass
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
from camel.configs import ChatGPTConfig
from camel.agents import ChatAgent
# Prompt for the API key securely
openai_api_key = getpass('Enter your API key: ')
model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
model_config_dict=ChatGPTConfig().as_dict(),
)
#Create some agent
search_agent=SearchAgent(model=model)
sys_msg = 'no matter what I say, answer "ok"'
agent = ChatAgent(
system_message=sys_msg,
model=model,
message_window_size=5,
)
for i in range(1, 16):
response = agent.step(f'give me some knowledge{i}')
print(response.msgs[0].content)Command lines:
Extra dependencies:
Steps to reproduce:
Traceback
Expected behavior
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
No status