mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(main.py): add sambanova api base support to embeddings
This commit is contained in:
parent
6a77780c0e
commit
280ad6f049
2 changed files with 8 additions and 11 deletions
|
|
@ -1890,7 +1890,7 @@ def completion( # type: ignore # noqa: PLR0915
|
|||
or get_secret_str("COMETAPI_KEY")
|
||||
or litellm.api_key
|
||||
)
|
||||
|
||||
|
||||
api_base = (
|
||||
api_base
|
||||
or litellm.api_base
|
||||
|
|
@ -1917,7 +1917,7 @@ def completion( # type: ignore # noqa: PLR0915
|
|||
stream=stream,
|
||||
provider_config=provider_config,
|
||||
)
|
||||
|
||||
|
||||
## LOGGING
|
||||
logging.post_call(
|
||||
input=messages, api_key=api_key, original_response=response
|
||||
|
|
@ -4281,6 +4281,12 @@ def embedding( # noqa: PLR0915
|
|||
)
|
||||
elif custom_llm_provider == "sambanova":
|
||||
api_key = api_key or litellm.api_key or get_secret_str("SAMBANOVA_API_KEY")
|
||||
api_base = (
|
||||
api_base
|
||||
or litellm.api_base
|
||||
or get_secret_str("SAMBANOVA_API_BASE")
|
||||
or "https://api.sambanova.ai/v1"
|
||||
)
|
||||
response = base_llm_http_handler.embedding(
|
||||
model=model,
|
||||
input=input,
|
||||
|
|
|
|||
|
|
@ -16902,15 +16902,6 @@
|
|||
"supports_reasoning": true,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"sambanova/E5-Mistral-7B-Instruct": {
|
||||
"max_tokens": 4096,
|
||||
"max_input_tokens": 4096,
|
||||
"input_cost_per_token": 1.3e-07,
|
||||
"output_cost_per_token": 0.0,
|
||||
"litellm_provider": "sambanova-embedding-models",
|
||||
"mode": "embedding",
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"assemblyai/nano": {
|
||||
"mode": "audio_transcription",
|
||||
"input_cost_per_second": 0.00010278,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue