where can i chage Agent Mode #6313
Unanswered
KwanFaiLau
asked this question in
Help
Replies: 1 comment
-
To change the default Agent Mode to Function Calling when creating an agent using version 0.6.12fix with Docker on an Ubuntu 20.04 server, you need to set the Here is the relevant part of the code where the class AgentConfigManager:
@classmethod
def convert(cls, config: dict) -> Optional[AgentEntity]:
if 'agent_mode' in config and config['agent_mode'] and 'enabled' in config['agent_mode']:
agent_dict = config.get('agent_mode', {})
agent_strategy = agent_dict.get('strategy', 'cot')
if agent_strategy == 'function_call':
strategy = AgentEntity.Strategy.FUNCTION_CALLING
elif agent_strategy == 'cot' or agent_strategy == 'react':
strategy = AgentEntity.Strategy.CHAIN_OF_THOUGHT
else:
if config['model']['provider'] == 'openai':
strategy = AgentEntity.Strategy.FUNCTION_CALLING
else:
strategy = AgentEntity.Strategy.CHAIN_OF_THOUGHT
# Additional configuration code...
return AgentEntity(
provider=config['model']['provider'],
model=config['model']['name'],
strategy=strategy,
# Other properties...
)
return None To set the default mode to Function Calling, ensure that the agent_config = {
'model': {
'provider': 'openai',
'name': 'your_model_name',
},
'agent_mode': {
'enabled': True,
'strategy': 'function_call',
# Other agent mode settings...
},
# Other configuration settings...
}
agent = AgentConfigManager.convert(agent_config) This will ensure that the default mode is set to Function Calling when the agent is created [1][2][3]. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
0.6.12fix with docker on ubuntu20.04 server
when i create an agent ,the default Agent Mode is ReACT ,where can i chage this Agent Mode to Function Calling
Beta Was this translation helpful? Give feedback.
All reactions