mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 17:04:01 -04:00
## Summary
Follow up to #161676.
Since we added support for handling SSE-streams returned by OpenAI APIs
to `@kbn/ml-response-stream` in #162335, this updates the "Gen AI
Streaming Response" developer example to make use of the custom hook
`useFetchStream()` from `@kbn/ml-response-stream` instead of its inline
code to process the stream on the client.
It also improves the refresh behaviour: Previously, once a prompt was
entered and the accordion opened, every keystroke in the prompt textarea
would cause a new request to the AI endpoint. This update adds a
`Refresh prompt` to only do a new request on this user action. Support
for cancelling requests when unmounting the `StreamingResponse`
component was also added.
![gen-ai-streaming-0001](
|
||
---|---|---|
.. | ||
alerting_example | ||
embedded_lens_example | ||
exploratory_view_example | ||
gen_ai_streaming_response_example | ||
reporting_example | ||
screenshotting_example | ||
testing_embedded_lens | ||
third_party_lens_navigation_prompt | ||
third_party_maps_source_example | ||
third_party_vis_lens_example | ||
triggers_actions_ui_example | ||
ui_actions_enhanced_examples | ||
README.md |
Example plugins
This folder contains X-Pack example plugins. To run the plugins in this folder, use the --run-examples
flag, via
yarn start --run-examples