Overview
As of the version 12.7.1
, the SDK exposes a variety of AI-related components and props. Their aim is to allow for seamless integration with AI-powered services, for example, the rendering of AI responses in a chat-bot like style.
Please, refer to our React Assistant tutorial for more in-depth guidance. It is highly encouraged to read the tutorial before integrating AI in your application.
AI States
As per our current specification, the AI is allowed several states that are related to its current progress in producing a response. You may find the currently available states here: https://github.com/GetStream/stream-chat-react/blob/0577ffdbd2abf11b6b99a2e70caa938ea19635e9/src/components/AIStateIndicator/hooks/useAIState.ts#L7.
Provided below is a brief explanation of what each state means:
AI_STATE_THINKING
- the AI is thinking and trying to internally craft an answer to your queryAI_STATE_GENERATING
- the actual response to your query is being generatedAI_STATE_EXTERNAL_SOURCES
- the AI is checking external resources for informationAI_STATE_ERROR
- the AI has reached an error state while trying to answer your queryAI_STATE_IDLE
- the AI is in an idle state and is not doing anything
If you are using your own implementation and have different states than these, you can feel free to override our default components as well as their behaviour.