mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-16 09:34:30 -04:00
[PR #47] [MERGED] Temporary workaround for generating unique model names #304
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langchain-ai/langserve/pull/47
Author: @eyurtsev
Created: 10/16/2023
Status: ✅ Merged
Merged: 10/17/2023
Merged by: @eyurtsev
Base:
main← Head:eugene/add_unique_names📝 Commits (10+)
1dbe49eworkaround9568c7cUpdate langserve/server.py2992164x90c70ecMerge branch 'main' into eugene/add_unique_namesadf36b0x0f42b2dxf733cffMerge branch 'main' into eugene/add_unique_namesd469ff0x8714950x04a9d36relock📊 Changes
4 files changed (+149 additions, -29 deletions)
View changed files
📝
langserve/server.py(+51 -25)📝
poetry.lock(+23 -2)📝
pyproject.toml(+1 -1)📝
tests/unit_tests/test_server_client.py(+74 -1)📄 Description
If two schema different schemas share the same name, fastapi openapi documentation fails.
This is a temporary work-around for openapi spec generation purposes. It will work only for top level model names.
We've bumped into this issue while hosting 2 runnables that start with a PromptTemplate (same name for the schema), but have different template variables (so the schema are different).
We'll need to find a better solution to handle nested models. This should be good for now as it'll allow users to deploy the common case correctly.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.