mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-23 15:48:11 +02:00
add:openai text to speech
This commit is contained in:
parent
b603e19bda
commit
cc92d8fb4a
2 changed files with 16 additions and 0 deletions
|
|
@ -235,3 +235,7 @@ class OpenAILLM(BaseLLM):
|
|||
async def amoderation(self, content: Union[str, list[str]]):
|
||||
"""Moderate content."""
|
||||
return await self.aclient.moderations.create(input=content)
|
||||
|
||||
async def atext_to_speech(self, **kwargs):
|
||||
"""text to speech"""
|
||||
return await self.aclient.audio.speech.create(**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue