Skip to content

Commit

Permalink
Fix: add bedrock branch logic while creating kg index
Browse files Browse the repository at this point in the history
  • Loading branch information
NG85 committed Jan 7, 2025
1 parent c1efd7f commit 3765dee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/app/rag/knowledge_graph/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def get_llm_output_config(self):
# ollama support set format=json in the top-level request config, but not in the request's option
# https://github.com/ollama/ollama/blob/5e2653f9fe454e948a8d48e3c15c21830c1ac26b/api/types.go#L70
return {}
elif "bedrock" in self.dspy_lm.provider.lower():
# Fix: add bedrock branch to fix 'Malformed input request' error
# subject must not be valid against schema {"required":["messages"]}: extraneous key [response_mime_type] is not permitted
return {}
else:
return {
"response_mime_type": "application/json",
Expand Down

0 comments on commit 3765dee

Please sign in to comment.