How to set Max Tokens? #2274
Answered
by
jackgerrits
WebsheetPlugin
asked this question in
Q&A
-
I am looking to set Max_Tokens for Agents or models, but it seems not to be working. It tried this way: self.writer_config = {
"cache_seed": 43, # change the cache_seed for different trials
"temperature": 0,
"config_list": CONFIG_LIST,
"timeout": 120,
"max_tokens": 300,
}
self.writer = autogen.AssistantAgent(
name="WRITER",
llm_config=self.writer_config,
system_message="""Engineer. You follow an approved plan. You write python/shell code to solve tasks. Wrap the code in a code block that specifies the script type. The user can't modify your code. So do not suggest incomplete code which requires others to modify. Don't use a code block if it's not intended to be executed by the executor.
Don't include multiple code blocks in one response. Do not ask others to copy and paste the result. Check the execution result returned by the executor.
If the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try.
""", |
Beta Was this translation helpful? Give feedback.
Answered by
jackgerrits
Apr 4, 2024
Replies: 1 comment 1 reply
-
That is how I would expect to set max tokens, is it not working? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
WebsheetPlugin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is how I would expect to set max tokens, is it not working?