mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
feat - support health check audio_speech
This commit is contained in:
parent
e3142b4294
commit
2432c90515
2 changed files with 14 additions and 1 deletions
|
@ -1881,8 +1881,15 @@ class OpenAIChatCompletion(BaseLLM):
|
||||||
model=model, # type: ignore
|
model=model, # type: ignore
|
||||||
prompt=prompt, # type: ignore
|
prompt=prompt, # type: ignore
|
||||||
)
|
)
|
||||||
|
elif mode == "audio_speech":
|
||||||
|
# Get the current directory of the file being run
|
||||||
|
completion = await client.audio.speech.with_raw_response.create(
|
||||||
|
model=model, # type: ignore
|
||||||
|
input=prompt, # type: ignore
|
||||||
|
voice="alloy",
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
raise Exception("mode not set")
|
raise ValueError("mode not set, passed in mode: " + mode)
|
||||||
response = {}
|
response = {}
|
||||||
|
|
||||||
if completion is None or not hasattr(completion, "headers"):
|
if completion is None or not hasattr(completion, "headers"):
|
||||||
|
|
|
@ -8,6 +8,12 @@ model_list:
|
||||||
litellm_params:
|
litellm_params:
|
||||||
model: fireworks_ai/accounts/fireworks/models/llama-v3-70b-instruct
|
model: fireworks_ai/accounts/fireworks/models/llama-v3-70b-instruct
|
||||||
api_key: "os.environ/FIREWORKS"
|
api_key: "os.environ/FIREWORKS"
|
||||||
|
- model_name: tts
|
||||||
|
litellm_params:
|
||||||
|
model: openai/tts-1
|
||||||
|
api_key: "os.environ/OPENAI_API_KEY"
|
||||||
|
model_info:
|
||||||
|
mode: audio_speech
|
||||||
general_settings:
|
general_settings:
|
||||||
master_key: sk-1234
|
master_key: sk-1234
|
||||||
alerting: ["slack"]
|
alerting: ["slack"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue