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(client): make llm chat service works with pydantic v2 #3027

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

jialeicui
Copy link
Contributor

@jialeicui jialeicui commented Nov 24, 2023

Description

  • FastAPI uses return type annotation to generate router, the typing system does not support |
  • Pydantic v2 optional field should specify = None if the construct function does not always contain the field.
  • Top K to int

Modules

  • UI
  • Controller
  • Agent
  • Client
  • Python-SDK
  • Others

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

@jialeicui jialeicui added bug 🐛 Something isn't working client 🌈 labels Nov 24, 2023
@jialeicui jialeicui changed the title Fix service fix(client): make llm chat service works with pydantic v2 Nov 24, 2023
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (17b8f60) 82.72% compared to head (ba4adb0) 91.91%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3027      +/-   ##
============================================
+ Coverage     82.72%   91.91%   +9.18%     
============================================
  Files           558      126     -432     
  Lines         30603    15044   -15559     
  Branches       1835        0    -1835     
============================================
- Hits          25315    13827   -11488     
+ Misses         4479     1217    -3262     
+ Partials        809        0     -809     
Flag Coverage Δ
console ?
controller ?
standalone 91.91% <100.00%> (-0.04%) ⬇️
unittests 91.91% <100.00%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tianweidut tianweidut left a comment

Choose a reason for hiding this comment

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

LGTM

@tianweidut tianweidut merged commit 8dcf930 into star-whale:main Nov 24, 2023
38 checks passed
@jialeicui jialeicui deleted the fix-service branch November 24, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working client 🌈
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants