You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time users' input as just str. The current interface always requires a BaseMessage as input, which is cumbersome:
sys_msg = bm.make_assistant_message(
role_name='stone',
content='you are a curious stone wondering about the universe.')
agent = ChatAgent(
system_message=sys_msg,
message_window_size=10, # [Optional] the length for chat memory
)
# Define a user message
usr_msg = bm.make_user_message(
role_name='prof. claude shannon',
content='what is information in your mind?')
# Sending the message to the agent
response = agent.step(usr_msg)
# Check the response (just for illustrative purpose)
print(response.msgs[0].content)
We want to simplify the interface to allow both str and BaseMessage as input. When str is used as input, we set default values for other fields:
sys_msg = 'you are a curious stone wondering about the universe.'
agent = ChatAgent(
system_message=sys_msg,
message_window_size=10, # [Optional] the length for chat memory
)
# Define a user message
usr_msg = 'what is information in your mind?'
# Sending the message to the agent
response = agent.step(usr_msg)
# Check the response (just for illustrative purpose)
print(response.msgs[0].content)
Solution
No response
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Required prerequisites
Motivation
Most of the time users' input as just
str
. The current interface always requires aBaseMessage
as input, which is cumbersome:We want to simplify the interface to allow both
str
andBaseMessage
as input. Whenstr
is used as input, we set default values for other fields:Solution
No response
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: