camel
camel copied to clipboard
[Feature Request] Refactor `ChatAgent`
Required prerequisites
- [X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- [X] Consider asking first in a Discussion.
Motivation
- current
ChatAgent
is redundant, we want to refactor this class to make it more tidy - we need to support passing API Key as parameter into
ChatAgent
, this feature is required for the platform development - remove ChatGPTVisionConfig , merge FunctionCallingConfig into ChatGPTConfig to make the abstraction tidy as discussed in https://github.com/camel-ai/camel/pull/473
Solution
- Separate initialization of
model
andchat agent
-
model_type
,model_config
,message_window_size
,token_limit
move tomodel
- move
def handle_batch_response
anddef handle_stream_response
fromchat agent
tomodel
- add config folder, set model config based on framework
- Model.create(platform='', model='',...)
Alternatives
No response
Additional context
No response
@ocss884 @zechengz feel free to add content into this issue description