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
* fix: typo
* fix: typo
* fix: typo of function name
* fix: typo of function name of test file
* Update test_token_count.py
---------
Co-authored-by: Eric Zhu <[email protected]>
# 1. mode = "TERMINATE", terminate the agent if no token left.
226
226
ifself.compress_config["mode"] =="TERMINATE":
227
227
ifmax_token_allowed-token_used<=0:
228
-
# Teminate if no token left.
228
+
# Terminate if no token left.
229
229
print(
230
230
colored(
231
231
f'Warning: Terminate Agent "{self.name}" due to no token left for oai reply. max token for {model}: {max_token_allowed}, existing token count: {token_used}',
@@ -320,7 +320,7 @@ def on_oai_token_limit(
320
320
cmsg["role"] ="user"
321
321
sender._oai_messages[self][i] =cmsg
322
322
323
-
# sucessfully compressed, return False, None for generate_oai_reply to be called with the updated messages
323
+
# successfully compressed, return False, None for generate_oai_reply to be called with the updated messages
324
324
returnFalse, None
325
325
returnfinal, None
326
326
@@ -332,7 +332,7 @@ def compress_messages(
332
332
"""Compress a list of messages into one message.
333
333
334
334
The first message (the initial prompt) will not be compressed.
335
-
The rest of the messages will be compressed into one message, the model is asked to distinuish the role of each message: USER, ASSISTANT, FUNCTION_CALL, FUNCTION_RETURN.
335
+
The rest of the messages will be compressed into one message, the model is asked to distinguish the role of each message: USER, ASSISTANT, FUNCTION_CALL, FUNCTION_RETURN.
336
336
Check out the compress_sys_msg.
337
337
338
338
TODO: model used in compression agent is different from assistant agent: For example, if original model used by is gpt-4; we start compressing at 70% of usage, 70% of 8092 = 5664; and we use gpt 3.5 here max_toke = 4096, it will raise error. choosinng model automatically?
func_sig (str or dict): description/name of the function to update/remove to the model. See: https://platform.openai.com/docs/api-reference/chat/create#chat/create-functions
1295
-
is_remove: whether removing the funciton from llm_config with name 'func_sig'
1295
+
is_remove: whether removing the function from llm_config with name 'func_sig'
Copy file name to clipboardExpand all lines: samples/apps/autogen-assistant/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ Now that you have AutoGen Assistant installed and running, you are ready to expl
77
77
78
78
This demo focuses on the research assistant use case with some generalizations:
79
79
80
-
- **Skills**: The agent is provided with a list of skills that it can leverage while attempting to address a user's query. Each skill is a python functionthat may be in any file in a folder made availabe to the agents. We separate the concept of global skills available to all agents `backend/files/global_utlis_dir` and user level skills `backend/files/user/<user_hash>/utils_dir`, relevant in a multi user environment. Agents are aware skills as they are appended to the system message. A list of example skills is available in the `backend/global_utlis_dir` folder. Modify the file or create a new file with a functionin the same directory to create new global skills.
80
+
- **Skills**: The agent is provided with a list of skills that it can leverage while attempting to address a user's query. Each skill is a python functionthat may be in any file in a folder made available to the agents. We separate the concept of global skills available to all agents `backend/files/global_utlis_dir` and user level skills `backend/files/user/<user_hash>/utils_dir`, relevant in a multi user environment. Agents are aware skills as they are appended to the system message. A list of example skills is available in the `backend/global_utlis_dir` folder. Modify the file or create a new file with a functionin the same directory to create new global skills.
81
81
82
82
- **Conversation Persistence**: Conversation history is persisted in an sqlite database `database.sqlite`.
Copy file name to clipboardExpand all lines: samples/tools/testbed/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This Testbed sample has been tested in, and is known to work with, Autogen versi
6
6
7
7
## Setup
8
8
9
-
Before you begin, you must configure your API keys for use with the Testbed. As with other Autogen applications, the Testbed will look for the OpenAI keys in a file in the current working directy, or environment variable named, OAI_CONFIG_LIST. This can be overrriden using a command-line parameter described later.
9
+
Before you begin, you must configure your API keys for use with the Testbed. As with other Autogen applications, the Testbed will look for the OpenAI keys in a file in the current working directory, or environment variable named, OAI_CONFIG_LIST. This can be overridden using a command-line parameter described later.
10
10
11
11
For some scenarios, additional keys may be required (e.g., keys for the Bing Search API). These can be added to an `ENV` file in the `includes` folder. A sample has been provided in ``includes/ENV.example``. Edit ``includes/ENV`` as needed.
12
12
@@ -56,7 +56,7 @@ options:
56
56
57
57
## Results
58
58
59
-
By default, the Testbed stores results in a folder heirarchy with the following template:
59
+
By default, the Testbed stores results in a folder hierarchy with the following template:
Where x_ij is the number of AsssitantAgent conversation turns needed to pass all the tests for problem i, in Trial/repetition j. If the agent was not able to pass the tests by the end of the conversation, the value will be -1. If data for the trial is missing, the value will be an empty string "".
96
+
Where x_ij is the number of AssistantAgent conversation turns needed to pass all the tests for problem i, in Trial/repetition j. If the agent was not able to pass the tests by the end of the conversation, the value will be -1. If data for the trial is missing, the value will be an empty string "".
Copy file name to clipboardExpand all lines: samples/tools/testbed/utils/collate_human_eval.py
+1-1
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ def collate(results_dir):
83
83
HumanEval_M, x_M0, x_M1, ..., X_MN
84
84
85
85
86
-
Where x_ij is the number of AsssitantAgent conversation turns needed to pass all the tests for problem i, in Trial/repetition j. If the agent was not able to pass the tests by the end of the conversation, the value will be -1. If data for the trial is missing, the value will be an empty string "".
86
+
Where x_ij is the number of AssistantAgent conversation turns needed to pass all the tests for problem i, in Trial/repetition j. If the agent was not able to pass the tests by the end of the conversation, the value will be -1. If data for the trial is missing, the value will be an empty string "".
Copy file name to clipboardExpand all lines: test/agentchat/contrib/test_gpt_assistant.py
+3-3
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ def test_gpt_assistant_chat():
42
42
},
43
43
"required": ["question"],
44
44
},
45
-
"description": "This is an API endpoint allowing users (analysts) to input question about GitHub in text format to retrieve the realted and structured data.",
45
+
"description": "This is an API endpoint allowing users (analysts) to input question about GitHub in text format to retrieve the related and structured data.",
0 commit comments