chore: initial public snapshot for github upload
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"""
|
||||
Nebius AI Studio Chat Completions API - Transformation
|
||||
|
||||
This is OpenAI compatible - no translation needed / occurs
|
||||
"""
|
||||
|
||||
from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
|
||||
|
||||
|
||||
class NebiusConfig(OpenAIGPTConfig):
|
||||
def map_openai_params(
|
||||
self,
|
||||
non_default_params: dict,
|
||||
optional_params: dict,
|
||||
model: str,
|
||||
drop_params: bool,
|
||||
) -> dict:
|
||||
"""
|
||||
map max_completion_tokens param to max_tokens
|
||||
"""
|
||||
supported_openai_params = self.get_supported_openai_params(model=model)
|
||||
for param, value in non_default_params.items():
|
||||
if param == "max_completion_tokens":
|
||||
optional_params["max_tokens"] = value
|
||||
elif param in supported_openai_params:
|
||||
optional_params[param] = value
|
||||
return optional_params
|
||||
@@ -0,0 +1,5 @@
|
||||
"""
|
||||
Calls handled in openai/
|
||||
|
||||
as Nebius AI Studio is an openai-compatible endpoint.
|
||||
"""
|
||||
Reference in New Issue
Block a user