Skip to content
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

fix: token_id to default #432

Merged
merged 1 commit into from
Oct 12, 2024
Merged

Conversation

RaoHai
Copy link
Contributor

@RaoHai RaoHai commented Oct 12, 2024

No description provided.

Copy link

vercel bot commented Oct 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2024 5:52am

Copy link

Walkthrough

This pull request updates the default values for the llm and token_id fields in the bot.py file. The llm field now defaults to "openai", and the token_id field defaults to an empty string. These changes ensure that these fields have default values if none are provided.

Changes

File Summary
server/core/type_class/bot.py Updated default values for llm and token_id fields to "openai" and an empty string, respectively.

llm: Optional[str] = None
token_id: Optional[str] = None
llm: Optional[str] = "openai"
token_id: Optional[str] = ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting token_id to an empty string as a default value might lead to unexpected behavior if the empty string is not a valid token. Consider using None or a more meaningful default value if applicable.

Copy link

codecov bot commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
server/core/type_class/bot.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Copy link
Contributor

@xingwanying xingwanying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@xingwanying xingwanying merged commit 77d5ed8 into main Oct 12, 2024
5 checks passed
@xingwanying xingwanying deleted the fix/bot-token_id-to-default-sometimes branch October 12, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants