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

feat: FastAPI Implementation of Sotopia Part One (wo websocket) #246

Merged
merged 22 commits into from
Nov 26, 2024

Conversation

XuhuiZhou
Copy link
Member

@XuhuiZhou XuhuiZhou commented Nov 11, 2024

Closes #

πŸ“‘ Description

This pull request shows an initial implementation of the fastapi server wo the websocket part

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

β„Ή Additional Information

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 99.47917% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.47%. Comparing base (07ee2c4) to head (f6236f3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sotopia/ui/fastapi_server.py 98.94% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
+ Coverage   72.88%   74.47%   +1.59%     
==========================================
  Files          58       61       +3     
  Lines        2972     3162     +190     
==========================================
+ Hits         2166     2355     +189     
- Misses        806      807       +1     
Files with missing lines Coverage Ξ”
sotopia/database/persistent_profile.py 89.65% <100.00%> (+0.36%) ⬆️
sotopia/server.py 41.66% <100.00%> (ΓΈ)
sotopia/ui/__init__.py 100.00% <100.00%> (ΓΈ)
tests/ui/test_fastapi.py 100.00% <100.00%> (ΓΈ)
sotopia/ui/fastapi_server.py 98.94% <98.94%> (ΓΈ)

@XuhuiZhou XuhuiZhou requested a review from ProKil November 11, 2024 02:29
@ProKil ProKil changed the title Feature/sotopia UI fastapi wowebsocket FastAPI Implementation of REST API Interface of Sotopia Nov 11, 2024
@ProKil
Copy link
Member

ProKil commented Nov 11, 2024

Could you add tests to the implementation? FastAPI has a test runner which could be very useful: https://fastapi.tiangolo.com/tutorial/testing/

@XuhuiZhou XuhuiZhou changed the title FastAPI Implementation of REST API Interface of Sotopia FastAPI Implementation of Sotopia Part One (wo websocket) Nov 12, 2024
@ProKil ProKil changed the title FastAPI Implementation of Sotopia Part One (wo websocket) feat: FastAPI Implementation of Sotopia Part One (wo websocket) Nov 14, 2024
@XuhuiZhou XuhuiZhou added the ui label Nov 20, 2024
@XuhuiZhou XuhuiZhou marked this pull request as draft November 20, 2024 23:33
tests/ui/test_fastapi.py Outdated Show resolved Hide resolved
Copy link
Member

@ProKil ProKil left a comment

Choose a reason for hiding this comment

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

I have a naming suggestion: in pyproject.toml, we can rename the extra dependency group chat to api. The original name is for the chat frontend, while we are now exposing api for simulation

@XuhuiZhou XuhuiZhou marked this pull request as ready for review November 26, 2024 02:18
@XuhuiZhou XuhuiZhou requested a review from ProKil November 26, 2024 02:47
@ProKil ProKil merged commit d55ec34 into main Nov 26, 2024
9 checks passed
@ProKil ProKil deleted the feature/sotopia-ui-fastapi-wowebsocket branch November 26, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants