-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ChatAgent support api key as parameter #551
Conversation
Important Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
ChatAgent
ChatAgent
ChatAgent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Some comments.
And another question for other agents‘ code, I noticed that all agents, including CriticAgent
, DeductiveReasonerAgent
, EmbodiedAgent
, RoleAssignmentAgent
and TaskSpecifyAgent
, inherit from ChatAgent
. What about add codes such as
super().__init__(
system_message,
model_type=model_type,
model_config=model_config,
output_language=output_language,
_api_key = api_key
)
for all of them.
Thanks @yiyiyi0817 ! Great point, will do the update with refactor PR here: #574 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! LGTM.
Why we need this? |
agent app build with camel would require users pass their own api key to set their agent |
@Wendong-Fan In the agent app how we setup the chat agent? For example, can we set the OpenAI Key via environment variable at somewhere instead of passing the api key to the chat agent? To me the api key should be bind to the model not the agent. WDYT? |
Description
allow user pass their openai key as argument in
ChatAgent
Motivation and Context
close #550
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!