Is there a way to specify headers for OpenAPI Plugins without explicitly doing so in the query? #5662
-
With Plugins it allows the developer to abstract away the complexity of calling tools for enhanced LLM functionality. The most standardized and customizable method of this seems to be through the use of API calls that are specified in an OpenAPI schema .yaml file. This is very powerful but I have not figured out a way to specify the headers to be used without explicitly stating them in my query. If I were to do this then it removes some of that abstraction away and requires the user to know what is going on behind the scenes. Has this already been solved in other ways or is there a better approach I am missing? Another issue I run into that is related is the LLM tends to hallucinate on the query_params and uses ones that do not exist. Any help or advice would be appreciated. I am using the Python SDK. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @ColtonBehannon, per our other conversation, I am working on the OpenAI/OpenAPI plugins. There's some existing code that I am seeing how it fits in. From what I see right now, the kernel function needs to be invoked with a headers dict/json string as kernel arguments. Is this what you're referring to as "If I were to do this then it removes some of that abstraction away and requires the user to know what is going on behind the scenes."? I see that the way Python does it is different than .NET, where Python explictly wants the path_params, headers, query_params, and request_body passed via the kernel args. On the other hand, dotnet is taking in the kernel args (whatever they may be) and is figuring out which are query and which are path params. |
Beta Was this translation helpful? Give feedback.
Hi @ColtonBehannon, per our other conversation, I am working on the OpenAI/OpenAPI plugins. There's some existing code that I am seeing how it fits in. From what I see right now, the kernel function needs to be invoked with a headers dict/json string as kernel arguments. Is this what you're referring to as "If I were to do this then it removes some of that abstraction away and requires the user to know what is going on behind the scenes."? I see that the way Python does it is different than .NET, where Python explictly wants the path_params, headers, query_params, and request_body passed via the kernel args. On the other hand, dotnet is taking in the kernel args (whatever they may be) and…