Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Fix issue with latest version of FastAPI, closes #1022

davidmezzettif682fd949a3b
diff --git a/src/python/txtai/api/route.py b/src/python/txtai/api/route.py
index 9c4d2692..408e9363 100644
--- a/src/python/txtai/api/route.py
+++ b/src/python/txtai/api/route.py
@@ -26,7 +26,7 @@ class EncodingAPIRoute(APIRoute):
body_field=self.body_field,
status_code=self.status_code,
response_class=ResponseFactory.create(request),
- response_field=self.secure_cloned_response_field,
+ response_field=getattr(self, "secure_cloned_response_field", self.response_field),
response_model_include=self.response_model_include,
response_model_exclude=self.response_model_exclude,
response_model_by_alias=self.response_model_by_alias,