Spec First design for the BedrockAgentFunctionResolver #4382
jeremycare
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Actually, I just realised the current BedrockAgentFunctionResolver does not handle the actionGroup defined with openapi spec. But only the ones defined with the functions. When using function definitions: {
"messageVersion": "1.0",
"function": "search",
"parameters": [
{
"name": "query",
"type": "string",
"value": "SELECT ...;"
}
],
"sessionId": "...",
"agent": {
"name": "agent",
"version": "DRAFT",
"id": "...",
"alias": "..."
},
"actionGroup": "action-group",
"sessionAttributes": {},
"promptSessionAttributes": {},
"inputText": "INPUT"
} When using openapi spec: {
"messageVersion": "1.0",
"parameters": [
{
"name": "query",
"type": "string",
"value": "SELECT ...;"
}
],
"inputText": "..",
"sessionId": "...",
"agent": {
"name": "agent",
"version": "DRAFT",
"id": "....",
"alias": "...."
},
"actionGroup": "action-group",
"sessionAttributes": {},
"promptSessionAttributes": {},
"httpMethod": "GET",
"apiPath": "/search/{query}"
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All!
In other projects where I need to implement an API with an OpenAPI, I tend to implement a spec-first design, where the code is generated/integrated with the OpenAPI Spec.
That provides some advantages:
Since we can define the tools of an ActionGroup as an OpenAPI spec, I think it would be beneficial to be able to inject the spec and have the BedrockAgentFunctionResolver typed correctly.
Something like that:
I think this approach would make it much easier to ensure type-safety and consistency between the OpenAPI definition and the resolver implementation. Would you consider supporting this kind of spec-driven typing in BedrockAgentFunctionResolver?
Beta Was this translation helpful? Give feedback.
All reactions