Stainless (#54)

* Fix DEV-291

* FastAPI Security Bearer Token

* Error Handling for Unique Keys

* Documentation
This commit is contained in:
Vineeth Voruganti 2024-05-09 13:28:16 -07:00 committed by GitHub
parent 107b40b9ac
commit 0eba9db235
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 32 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# 🫡 Honcho
![Static Badge](https://img.shields.io/badge/Version-0.0.7-blue)
![Static Badge](https://img.shields.io/badge/Version-0.0.8-blue)
[![Discord](https://img.shields.io/discord/1016845111637839922?style=flat&logo=discord&logoColor=23ffffff&label=Plastic%20Labs&labelColor=235865F2)](https://discord.gg/plasticlabs)
![GitHub License](https://img.shields.io/github/license/plastic-labs/honcho)
![GitHub Repo stars](https://img.shields.io/github/stars/plastic-labs/honcho)

View File

@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.0.8] — 2024-05-09
### Added
* Documentation to OpenAPI
* Bearer token auth to OpenAPI routes
* Get by ID routes for users and collections
### Changed
* Authentication Middleware now implemented using built-in FastAPI Security
module
* Get by name routes for users and collections now include "name" in slug
### Fixed
* Error reporting for methods with integrity errors due to unique key
constraints
## [0.0.7] — 2024-04-01
### Added

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "honcho"
version = "0.0.7"
version = "0.0.8"
description = "Honcho Server"
authors = ["Plastic Labs <hello@plasticlabs.ai>"]
readme = "README.md"

View File

@ -200,7 +200,7 @@ app = FastAPI(
summary="An API for adding personalization to AI Apps",
description="""This API is used to store data and get insights about users for AI
applications""",
version="0.1.0",
version="0.0.8",
contact={
"name": "Plastic Labs",
"url": "https://plasticlabs.ai",
@ -223,6 +223,16 @@ app.add_middleware(
allow_headers=["*"],
)
origins = ["http://localhost", "http://127.0.0.1:8000", "https://demo.honcho.dev"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
if OPENTELEMTRY_ENABLED:
FastAPIInstrumentor().instrument_app(app)

View File

@ -94,7 +94,6 @@ async def create_app(
try:
honcho_app = await crud.create_app(db, app=app)
return honcho_app
except IntegrityError as e:
raise HTTPException(
status_code=406, detail="App with name may already exist"