This commit is contained in:
Faisal Ilaiwi 2024-11-11 14:59:46 -05:00 committed by GitHub
commit 24b7cc1728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -79,6 +79,7 @@ class ConversableAgent(LLMAgent):
description: Optional[str] = None, description: Optional[str] = None,
chat_messages: Optional[Dict[Agent, List[Dict]]] = None, chat_messages: Optional[Dict[Agent, List[Dict]]] = None,
silent: Optional[bool] = None, silent: Optional[bool] = None,
role_for_system_message: Literal["system", "user"] = "system",
): ):
""" """
Args: Args:
@ -143,7 +144,7 @@ class ConversableAgent(LLMAgent):
else: else:
self._oai_messages = chat_messages self._oai_messages = chat_messages
self._oai_system_message = [{"content": system_message, "role": "system"}] self._oai_system_message = [{"content": system_message, "role": role_for_system_message}]
self._description = description if description is not None else system_message self._description = description if description is not None else system_message
self._is_termination_msg = ( self._is_termination_msg = (
is_termination_msg is_termination_msg

View File

@ -26,6 +26,12 @@ NON_CACHE_KEY = [
DEFAULT_AZURE_API_VERSION = "2024-02-01" DEFAULT_AZURE_API_VERSION = "2024-02-01"
OAI_PRICE1K = { OAI_PRICE1K = {
# https://openai.com/api/pricing/ # https://openai.com/api/pricing/
# o1-preview
"o1-preview": (0.015, 0.060),
"o1-preview-2024-09-12": (0.015, 0.060),
# o1-mini
"o1-mini": (0.003, 0.012),
"o1-mini-2024-09-12": (0.003, 0.012),
# gpt-4o # gpt-4o
"gpt-4o": (0.005, 0.015), "gpt-4o": (0.005, 0.015),
"gpt-4o-2024-05-13": (0.005, 0.015), "gpt-4o-2024-05-13": (0.005, 0.015),