> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# useGenAiDispatcher()

- Package: [@gooddata/sdk-ui-gen-ai](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-gen-ai/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-gen-ai/src/hooks/useGenAiDispatcher.ts
- Guides: [AI Assistant](https://www.gooddata.ai/docs/gooddata-ui/latest/ai-modules/ai-assistant/index.md), [Control the AI Assistant from your code](https://www.gooddata.ai/docs/gooddata-ui/latest/ai-modules/control-ai-assistant/index.md)

Hook to retrieve the GenAI dispatcher.

**Signature:**

```typescript
export declare function useGenAiDispatcher(): EnhancedStore["dispatch"];
```
**Returns:**

EnhancedStore["dispatch"]

## Remarks

This hook must be used within a GenAiStore component.
