[Generative AI] Connector cleanup #166960
Labels
NeededFor:ResponseOps
Team:Threat Hunting:Explore
Team:Threat Hunting
Security Solution Threat Hunting Team
v8.11.0
With the introduction of the AWS Bedrock connector, there are a few areas that need cleanup between the 2 generative ai connector types:
gen-ai
and.bedrock
. I'd have done these changes in the original PR but it was already getting big, so in the interest of smaller PRs...1.
.gen-ai
namingWhen we first created the Generative AI connector, we put the OpenAI APIs under the "Generative AI" naming as we had 2 provider types for Generative AI, both OpenAI. Now that we have another connector type that does Generative AI, this naming does not make sense: (please note this screenshot does not have the updated bedrock logo)
I updated the connector type name in my bedrock PR, but there are directories and files that should be renamed as well.
I do not think that we should update the connector id of
'.gen-ai'
for migration purposes... WDYT @elastic/response-ops-execution ?2. GeneralConnectorFeatureId to GenerativeAIConnectorFeatureId
We did not quite know what category the Generative AI connector fit into. But if we rename as proposed in step 1, OpenAI connector and the new AWS Bedrock connector, to me it makes sense this category should be called
3. Fix runApi
body
I'm not sure why I did it like this, but
runApi
expects body to be a stringified object. This is leading us to access the properties via multiple unsafe JSON.parse calls: ex 1, ex 2. This can be simply avoided byrunApi
validating a body object instead of a string, and stringifying before sending off to the APIThe text was updated successfully, but these errors were encountered: