Skip to content

Commit 54090ef

Browse files
committed
docs: add docs example of audio chat setup for the agent plugin
1 parent e00ce6b commit 54090ef

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

  • adminforth/documentation/docs/tutorial/08-Plugins

adminforth/documentation/docs/tutorial/08-Plugins/01-agent.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,41 @@ completionAdapter: new CompletionAdapterOpenAIResponses({
314314
OVH AI Endpoints still does not fully support the OpenAI `responses` API, so `useComplitionApi: false` may work unstably there.
315315

316316

317+
## Turn on audio chat support
318+
If you want to have an ability to talk with agent usng voice, you can setup it:
317319

320+
1) Install audio adapter:
321+
322+
```bash
323+
pnpm add @adminforth/audio-adapter-openai
324+
```
325+
326+
2) Import it in your users resource and add to the plugin config
327+
328+
```ts title="./resources/adminuser.ts"
329+
//diff-add
330+
import OpenAIAudioAdapter from '@adminforth/audio-adapter-openai'
331+
332+
...
333+
334+
335+
new AdminForthAgent({
336+
...
337+
//diff-add
338+
audioAdapter: new OpenAIAudioAdapter({
339+
//diff-add
340+
apiKey: process.env.OPENAI_API_KEY as string,,
341+
//diff-add
342+
defaultVoice: 'alloy',
343+
//diff-add
344+
defaultSpeed: 1.25,
345+
//diff-add
346+
}),
347+
...
348+
}),
349+
...
350+
351+
```
318352

319353
## Writing own skills
320354

0 commit comments

Comments
 (0)