Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Fixed format

lightaime65a2faae4183
diff --git a/camel/camel_utils.py b/camel/camel_utils.py
index fa4dc7ecd..9aa4fe05a 100644
--- a/camel/camel_utils.py
+++ b/camel/camel_utils.py
@@ -32,4 +32,4 @@ def num_tokens_from_messages(messages: List[OpenAIMessage], model: ModeType):
def get_model_token_limit(model: ModeType) -> int:
"""Returns the maximum number of tokens for a given model."""
if model == ModeType.GPT_3_5_TURBO:
- return 4096
\ No newline at end of file
+ return 4096
diff --git a/camel/chat_agent.py b/camel/chat_agent.py
index 437a2de97..1bd4367c5 100644
--- a/camel/chat_agent.py
+++ b/camel/chat_agent.py
@@ -1,8 +1,8 @@
from typing import Any, Dict, List, Optional, Tuple
import openai
-from camel_typing import (MessageType, ModeType, RoleType, SystemMessage,
- ChatMessage)
+from camel_typing import (ChatMessage, MessageType, ModeType, RoleType,
+ SystemMessage)
from camel_utils import get_model_token_limit, num_tokens_from_messages
from configs import ChatGPTConfig
from tenacity import retry, stop_after_attempt
diff --git a/camel/configs.py b/camel/configs.py
index 7ca570ed1..a323230ae 100644
--- a/camel/configs.py
+++ b/camel/configs.py
@@ -65,7 +65,7 @@ class SystemMessageGenerator:
content=new_role_prompt)
if role_type == RoleType.DEFAULT:
- new_role_prompt = role_prompt or f"Your are a helpful assistant."
+ new_role_prompt = role_prompt or "Your are a helpful assistant."
return SystemMessage(role_type=role_type,
role_name=role_name,
diff --git a/camel/role_playing.py b/camel/role_playing.py
index 108009520..236f78ab0 100644
--- a/camel/role_playing.py
+++ b/camel/role_playing.py
@@ -17,10 +17,9 @@ def init_chat(
# Send the system messages again to the agents using chat messages
assistant_msg = AssistantChatMessage(
"Computer Programer",
- content=
- (f"{user_sys_msg.content}. "
- f"Now start to give me introductions one by one. Only reply with Instruction and Input."
- ))
+ content=(f"{user_sys_msg.content}. "
+ "Now start to give me introductions one by one. "
+ "Only reply with Instruction and Input."))
assistant_msg.role = "user"
user_msg = UserChatMessage("Student",
@@ -60,4 +59,3 @@ def main() -> None:
if __name__ == "__main__":
main()
- exit()
\ No newline at end of file