Skip to content

Commit

Permalink
Revert to assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
Obs01ete committed Jun 27, 2023
1 parent 1b4e79e commit 781089a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions camel/agents/chat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ChatRecord:
message: BaseMessage

def to_openai_message(self):
"""Converts the payload message to OpenAI-compatible format.
r"""Converts the payload message to OpenAI-compatible format.
Returns:
OpenAIMessage: OpenAI-compatible message
Expand Down Expand Up @@ -197,7 +197,15 @@ def update_messages(self, role: str,
return self.stored_messages

def submit_message(self, message: BaseMessage) -> None:
self.stored_messages.append(ChatRecord('user', message))
r"""Submits the externaly provided message as if it were an answer of
the chat LLM from the backend. Currently the choise of the critic is
submitted with this method.
Args:
message (BaseMessage): An external message to be added as an
assistant response.
"""
self.stored_messages.append(ChatRecord('assistant', message))

@retry(wait=wait_exponential(min=5, max=60), stop=stop_after_attempt(5))
@openai_api_key_required
Expand Down

0 comments on commit 781089a

Please sign in to comment.