ajndkr / lanarky

The web framework for building LLM microservices
https://lanarky.ajndkr.com/
MIT License
975 stars 74 forks source link

fix: request and response model created by `LangchainRouter` breaks for complex chain types #71

Closed ajndkr closed 1 year ago

ajndkr commented 1 year ago

Scenario

User creates an application using RetrievalQAWithSourcesChain with streaming_mode=0

Actual result

API call fails due to:

pydantic.error_wrappers.ValidationError: 1 validation error for QbutpLangchainResponse
response -> source_documents
  str type expected (type=type_error.str)

Expected result

API call returns chain output

Acceptance criteria