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

Backend: update openapi spec #897

Merged
merged 36 commits into from
Jan 15, 2025
Merged

Backend: update openapi spec #897

merged 36 commits into from
Jan 15, 2025

Conversation

ezawadski
Copy link
Collaborator

@ezawadski ezawadski commented Jan 8, 2025

Description

Working towards having the OpenAPI Spec file being code driven and generated via FastAPI. This requires all path parameters, query parameters, and schemas used for requests and responses to have the additional metadata added to each field.

In the process, also trying to DRY up some of the path parameters, query parameters, and schemas used throughout the API by using inheritance and abstraction.

Docstrings in the Routers are also being cleaned up because this docstrings are using by FastAPI to document each endpoint in the OpenAPI Spec.

AI Description

The PR introduces several new features and improvements to the backend of a web application, primarily focusing on the addition of new features and improvements to existing ones.

New Features

  • Auth: The PR adds a new /tool/auth endpoint for tool authentication, which is different from the regular login OAuth flow. It stores a ToolAuth object in the database containing the access token for the tool.
  • Agent: The PR introduces a new /v1/agents endpoint for managing agents. It allows creating, listing, updating, and deleting agents, as well as managing agent tool metadata.
  • Chat: The PR adds a new /v1/chat endpoint for handling chat requests. It supports streaming chat responses, regenerating chat streams, and non-streamed chat responses.
  • Conversation: The PR introduces a new /v1/conversations endpoint for managing conversations. It allows creating, listing, updating, and deleting conversations, as well as uploading and listing files, generating titles, and synthesizing messages.
  • Deployment: The PR adds a new /v1/deployments endpoint for managing deployments. It supports creating, listing, updating, and deleting deployments, as well as setting environment variables.
  • Experimental Features: The PR adds a new /v1/experimental_features endpoint for listing experimental features and their enabled state.
  • Model: The PR introduces a new /v1/models endpoint for managing models. It allows <co: 8>creating, listing, updating, and deleting models.</co:

Copy link

cla-assistant bot commented Jan 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

cla-assistant bot commented Jan 8, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 99.18534% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.72%. Comparing base (d3d20fc) to head (73a6e70).

Files with missing lines Patch % Lines
src/backend/routers/agent.py 71.42% 2 Missing ⚠️
src/backend/routers/model.py 83.33% 1 Missing ⚠️
src/backend/routers/scim.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #897      +/-   ##
==========================================
+ Coverage   76.64%   76.72%   +0.08%     
==========================================
  Files         259      272      +13     
  Lines       10583    10620      +37     
==========================================
+ Hits         8111     8148      +37     
  Misses       2472     2472              

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

Copy link
Collaborator

@tianjing-li tianjing-li left a comment

Choose a reason for hiding this comment

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

One comment

Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks, Eric

@ezawadski ezawadski changed the title [WIP] Backend: update openapi spec Backend: update openapi spec Jan 13, 2025
@ezawadski ezawadski merged commit 6a81440 into main Jan 15, 2025
8 checks passed
@ezawadski ezawadski deleted the feat/update_openapi_spec branch January 15, 2025 17:29
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.

4 participants