mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-08 04:25:46 +00:00
Update OpenAPI code to fetch use the requestBody
- Description: The API doc passed to LLM only included the content of responses but did not include the content of requestBody, causing the agent to be unable to construct the correct request parameters based on the requestBody information. Add two lines of code fixed the bug, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: @hinthornw , - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out!
This commit is contained in:
parent
61c2d918c6
commit
67718c1d6b
@ -97,6 +97,8 @@ def reduce_openapi_spec(spec: dict, dereference: bool = True) -> ReducedOpenAPIS
|
||||
]
|
||||
if "200" in docs["responses"]:
|
||||
out["responses"] = docs["responses"]["200"]
|
||||
if docs.get("requestBody"):
|
||||
out["requestBody"] = docs.get("requestBody")
|
||||
return out
|
||||
|
||||
endpoints = [
|
||||
|
Loading…
Reference in New Issue
Block a user