-
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] Error when using ollama model locally #204116
Comments
Pinging @elastic/appex-ai-infra (Team:AI Infra) |
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
So this part is working as expected. The The stack connector is in charge of passing the information from the config to the provider during the remote call: kibana/x-pack/plugins/stack_connectors/server/connector_types/openai/openai.ts Lines 204 to 210 in 9372027
However looking at the code forging the request, it seems that the kibana/x-pack/plugins/stack_connectors/server/connector_types/openai/lib/utils.ts Lines 65 to 81 in 83a701e
The right approach for the fix seems to be to adapt |
So, I opened #204934 that will take care of the issue in the connector. That fixes the general error and allows to properly communicates with ollama. However, there seems to be something wrong with what the o11y assistant is doing, as the stream get closed in the middle and fails with something that seems related to the title generation: Screen.Recording.2024-12-19.at.14.04.05.movThe server error is, as always with RXJS, incredibly usable and totally shows where the issue is coming from:
After some debug logs, this is being thrown here: Lines 428 to 434 in 4455087
That observable is massive and we're getting out of my area of ownership though, so I'll let the @elastic/obs-ai-assistant team take a look if they so want. |
…4934) ## Summary Part of #204116 When model is not present in the payload, use the default model as specified in the connector configuration. We were already doing that for OpenAI-OpenAI, but not for "Other"-OpenAI. ### Some section because I downloaded ollama just for that issue <img width="950" alt="Screenshot 2024-12-19 at 13 53 48" src="https://github.com/user-attachments/assets/4a6e4b35-a0c5-46e5-9372-677e99d070f8" /> <img width="769" alt="Screenshot 2024-12-19 at 13 54 54" src="https://github.com/user-attachments/assets/a0a5a12a-ea1e-42b7-8fa1-6531bef5ae6c" />
…stic#204934) ## Summary Part of elastic#204116 When model is not present in the payload, use the default model as specified in the connector configuration. We were already doing that for OpenAI-OpenAI, but not for "Other"-OpenAI. ### Some section because I downloaded ollama just for that issue <img width="950" alt="Screenshot 2024-12-19 at 13 53 48" src="https://github.com/user-attachments/assets/4a6e4b35-a0c5-46e5-9372-677e99d070f8" /> <img width="769" alt="Screenshot 2024-12-19 at 13 54 54" src="https://github.com/user-attachments/assets/a0a5a12a-ea1e-42b7-8fa1-6531bef5ae6c" /> (cherry picked from commit d4bc9be)
…stic#204934) ## Summary Part of elastic#204116 When model is not present in the payload, use the default model as specified in the connector configuration. We were already doing that for OpenAI-OpenAI, but not for "Other"-OpenAI. ### Some section because I downloaded ollama just for that issue <img width="950" alt="Screenshot 2024-12-19 at 13 53 48" src="https://github.com/user-attachments/assets/4a6e4b35-a0c5-46e5-9372-677e99d070f8" /> <img width="769" alt="Screenshot 2024-12-19 at 13 54 54" src="https://github.com/user-attachments/assets/a0a5a12a-ea1e-42b7-8fa1-6531bef5ae6c" />
…stic#204934) ## Summary Part of elastic#204116 When model is not present in the payload, use the default model as specified in the connector configuration. We were already doing that for OpenAI-OpenAI, but not for "Other"-OpenAI. ### Some section because I downloaded ollama just for that issue <img width="950" alt="Screenshot 2024-12-19 at 13 53 48" src="https://github.com/user-attachments/assets/4a6e4b35-a0c5-46e5-9372-677e99d070f8" /> <img width="769" alt="Screenshot 2024-12-19 at 13 54 54" src="https://github.com/user-attachments/assets/a0a5a12a-ea1e-42b7-8fa1-6531bef5ae6c" />
Similar to the bug described here, #204014, the
model
(llama 3.2) isn't being passed to chat completions and fails with an unexpected error[2024-12-12T14:02:39.743-05:00][WARN ][plugins.actions.gen-ai] action execution failure: .gen-ai:8608ccb6-4e2a-4045-a729-ab4b556ea5ad: Llama: an error occurred while running the action: Status code: 400. Message: API Error: Bad Request - model is required; retry: true
[2024-12-12T14:02:39.744-05:00][ERROR][plugins.observabilityAIAssistant.service] Error: Unexpected error
at createInferenceInternalError (elastic/kibana/x-pack/platform/packages/shared/ai-infra/inference-common/src/errors.ts:49:10)
at elastic/kibana/x-pack/platform/plugins/shared/inference/server/chat_complete/adapters/openai/openai_adapter.ts:68:92
The text was updated successfully, but these errors were encountered: