-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Obs AI Assistant] Fix null pointer in function definition #203344
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
.map((fn) => [fn.name, { description: fn.description, schema: fn.parameters }]) | ||
[...actions, ...esqlFunctions].map((fn) => [ | ||
fn.name, | ||
{ description: fn.description, schema: fn.parameters } as ToolDefinition, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgayvallet @arturoliduena actions.parameters
is typed as ToolSchema
whereas esqlFunctions
is typed as CompatibleJSONSchema
. This gives some incompatibilities when merging the types so I had to do type assertion.
Is the plan to get rid of CompatibleJSONSchema
in favor of ToolSchema
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CompatibleJSONSchema
is defined here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to get rid of CompatibleJSONSchema in favor of ToolSchema?
I think that question is on your side? CompatibleJSONSchema
is a o11y assistant type, ToolSchema
is an inference
plugin's type. You're more than welcome, and encouraged, to drop your own types in favor of the inference framework's, but that's not really my call, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in that case it's mostly a question for @arturoliduena
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m also in favor of moving towards using the inference
plugin’s types when possible,as it supports a more consistent approach across plugins. However, I had a similar conversation with @dgieselaar and at the moment we agree on keeping o11y assistant types:
Ideally we encapsulate the event type from the inference client here, and convert it into ChatCompletionChunkEvent. We should eventually completely drop ChatCompletionChunkEvent in favor of the inference plugin's types, but that means that we need to make changes in many places, and there's some stuff that isn't supported yet by the Inference plugin's types. Until that happens, I think we should limit the blast radius and stick to our own types where we can - which should be everywhere except for the implementation of this function, I think.
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Starting backport for target branches: 8.16, 8.17, 8.x |
…03344) Closes elastic#201713 (cherry picked from commit 1d9ca1e)
…03344) Closes elastic#201713 (cherry picked from commit 1d9ca1e)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…03344) (#203435) # Backport This will backport the following commits from `main` to `8.17`: - [[Obs AI Assistant] Fix null pointer in function definition (#203344)](#203344) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Søren Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T14:00:05Z","message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","v8.17.0"],"title":"[Obs AI Assistant] Fix null pointer in function definition","number":203344,"url":"https://github.com/elastic/kibana/pull/203344","mergeCommit":{"message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203344","number":203344,"mergeCommit":{"message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Søren Louv-Jansen <[email protected]>
…3344) (#203436) # Backport This will backport the following commits from `main` to `8.x`: - [[Obs AI Assistant] Fix null pointer in function definition (#203344)](#203344) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Søren Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T14:00:05Z","message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","v8.17.0"],"title":"[Obs AI Assistant] Fix null pointer in function definition","number":203344,"url":"https://github.com/elastic/kibana/pull/203344","mergeCommit":{"message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203344","number":203344,"mergeCommit":{"message":"[Obs AI Assistant] Fix null pointer in function definition (#203344)\n\nCloses #201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Søren Louv-Jansen <[email protected]>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
15 similar comments
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Closes #201713