UNPKG

@cotofe/service-of-litellm

Version:

OpenAPI client for @cotofe/service-of-litellm

112 lines (111 loc) 18.3 kB
/** * Platform * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Deployment, ModelInfoDelete, UpdateDeployment } from '../models/index'; import * as runtime from '../runtime'; export interface LitellmModelManagementApiAddNewModelModelNewPostRequest { deployment?: Deployment; } export interface LitellmModelManagementApiDeleteModelModelDeletePostRequest { modelInfoDelete?: ModelInfoDelete; } export interface LitellmModelManagementApiModelGroupInfoModelGroupInfoGetRequest { modelGroup?: string | null; } export interface LitellmModelManagementApiModelInfoV1ModelInfoGetRequest { litellmModelId?: string | null; } export interface LitellmModelManagementApiModelListModelsGetRequest { returnWildcardRoutes?: boolean | null; teamId?: string | null; } export interface LitellmModelManagementApiPatchModelModelModelIdUpdatePatchRequest { modelId: string; updateDeployment?: UpdateDeployment; } export interface LitellmModelManagementApiUpdateModelModelUpdatePostRequest { updateDeployment?: UpdateDeployment; } /** * */ export declare class LitellmModelManagementApi extends runtime.BaseAPI { /** * Allows adding new models to the model list in the config.yaml * Add New Model */ addNewModelModelNewPostRaw(requestParameters: LitellmModelManagementApiAddNewModelModelNewPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Allows adding new models to the model list in the config.yaml * Add New Model */ addNewModelModelNewPost(requestParameters?: LitellmModelManagementApiAddNewModelModelNewPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Allows deleting models in the model list in the config.yaml * Delete Model */ deleteModelModelDeletePostRaw(requestParameters: LitellmModelManagementApiDeleteModelModelDeletePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Allows deleting models in the model list in the config.yaml * Delete Model */ deleteModelModelDeletePost(requestParameters?: LitellmModelManagementApiDeleteModelModelDeletePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc. - /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (`model_name` in config.yaml) Example Request (All Models): ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info\' -H \'accept: application/json\' -H \'x-api-key: sk-1234\' ``` Example Request (Specific Model Group): ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0\' -H \'accept: application/json\' -H \'Authorization: Bearer sk-1234\' ``` Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/_*` on config.yaml) ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info?model_group=openai/tts-1\' -H \'accept: application/json\' -H \'Authorization: Bearersk-1234\' ``` Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing) Example Response: ```json { \"data\": [ { \"model_group\": \"rerank-english-v3.0\", \"providers\": [ \"cohere\" ], \"max_input_tokens\": null, \"max_output_tokens\": null, \"input_cost_per_token\": 0.0, \"output_cost_per_token\": 0.0, \"mode\": null, \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": false, \"supports_function_calling\": false, \"supported_openai_params\": [ \"stream\", \"temperature\", \"max_tokens\", \"logit_bias\", \"top_p\", \"frequency_penalty\", \"presence_penalty\", \"stop\", \"n\", \"extra_headers\" ] }, { \"model_group\": \"gpt-3.5-turbo\", \"providers\": [ \"openai\" ], \"max_input_tokens\": 16385.0, \"max_output_tokens\": 4096.0, \"input_cost_per_token\": 1.5e-06, \"output_cost_per_token\": 2e-06, \"mode\": \"chat\", \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": false, \"supports_function_calling\": true, \"supported_openai_params\": [ \"frequency_penalty\", \"logit_bias\", \"logprobs\", \"top_logprobs\", \"max_tokens\", \"max_completion_tokens\", \"n\", \"presence_penalty\", \"seed\", \"stop\", \"stream\", \"stream_options\", \"temperature\", \"top_p\", \"tools\", \"tool_choice\", \"function_call\", \"functions\", \"max_retries\", \"extra_headers\", \"parallel_tool_calls\", \"response_format\" ] }, { \"model_group\": \"llava-hf\", \"providers\": [ \"openai\" ], \"max_input_tokens\": null, \"max_output_tokens\": null, \"input_cost_per_token\": 0.0, \"output_cost_per_token\": 0.0, \"mode\": null, \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": true, \"supports_function_calling\": false, \"supported_openai_params\": [ \"frequency_penalty\", \"logit_bias\", \"logprobs\", \"top_logprobs\", \"max_tokens\", \"max_completion_tokens\", \"n\", \"presence_penalty\", \"seed\", \"stop\", \"stream\", \"stream_options\", \"temperature\", \"top_p\", \"tools\", \"tool_choice\", \"function_call\", \"functions\", \"max_retries\", \"extra_headers\", \"parallel_tool_calls\", \"response_format\" ] } ] } ``` * Model Group Info */ modelGroupInfoModelGroupInfoGetRaw(requestParameters: LitellmModelManagementApiModelGroupInfoModelGroupInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc. - /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (`model_name` in config.yaml) Example Request (All Models): ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info\' -H \'accept: application/json\' -H \'x-api-key: sk-1234\' ``` Example Request (Specific Model Group): ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0\' -H \'accept: application/json\' -H \'Authorization: Bearer sk-1234\' ``` Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/_*` on config.yaml) ```shell curl -X \'GET\' \'http://localhost:4000/model_group/info?model_group=openai/tts-1\' -H \'accept: application/json\' -H \'Authorization: Bearersk-1234\' ``` Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing) Example Response: ```json { \"data\": [ { \"model_group\": \"rerank-english-v3.0\", \"providers\": [ \"cohere\" ], \"max_input_tokens\": null, \"max_output_tokens\": null, \"input_cost_per_token\": 0.0, \"output_cost_per_token\": 0.0, \"mode\": null, \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": false, \"supports_function_calling\": false, \"supported_openai_params\": [ \"stream\", \"temperature\", \"max_tokens\", \"logit_bias\", \"top_p\", \"frequency_penalty\", \"presence_penalty\", \"stop\", \"n\", \"extra_headers\" ] }, { \"model_group\": \"gpt-3.5-turbo\", \"providers\": [ \"openai\" ], \"max_input_tokens\": 16385.0, \"max_output_tokens\": 4096.0, \"input_cost_per_token\": 1.5e-06, \"output_cost_per_token\": 2e-06, \"mode\": \"chat\", \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": false, \"supports_function_calling\": true, \"supported_openai_params\": [ \"frequency_penalty\", \"logit_bias\", \"logprobs\", \"top_logprobs\", \"max_tokens\", \"max_completion_tokens\", \"n\", \"presence_penalty\", \"seed\", \"stop\", \"stream\", \"stream_options\", \"temperature\", \"top_p\", \"tools\", \"tool_choice\", \"function_call\", \"functions\", \"max_retries\", \"extra_headers\", \"parallel_tool_calls\", \"response_format\" ] }, { \"model_group\": \"llava-hf\", \"providers\": [ \"openai\" ], \"max_input_tokens\": null, \"max_output_tokens\": null, \"input_cost_per_token\": 0.0, \"output_cost_per_token\": 0.0, \"mode\": null, \"tpm\": null, \"rpm\": null, \"supports_parallel_function_calling\": false, \"supports_vision\": true, \"supports_function_calling\": false, \"supported_openai_params\": [ \"frequency_penalty\", \"logit_bias\", \"logprobs\", \"top_logprobs\", \"max_tokens\", \"max_completion_tokens\", \"n\", \"presence_penalty\", \"seed\", \"stop\", \"stream\", \"stream_options\", \"temperature\", \"top_p\", \"tools\", \"tool_choice\", \"function_call\", \"functions\", \"max_retries\", \"extra_headers\", \"parallel_tool_calls\", \"response_format\" ] } ] } ``` * Model Group Info */ modelGroupInfoModelGroupInfoGet(requestParameters?: LitellmModelManagementApiModelGroupInfoModelGroupInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { \"data\": [ { \"model_name\": \"fake-openai-endpoint\", \"litellm_params\": { \"api_base\": \"https://exampleopenaiendpoint-production.up.railway.app/\", \"model\": \"openai/fake\" }, \"model_info\": { \"id\": \"112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af\", \"db_model\": false } } ] } ``` * Model Info V1 */ modelInfoV1ModelInfoGetRaw(requestParameters: LitellmModelManagementApiModelInfoV1ModelInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { \"data\": [ { \"model_name\": \"fake-openai-endpoint\", \"litellm_params\": { \"api_base\": \"https://exampleopenaiendpoint-production.up.railway.app/\", \"model\": \"openai/fake\" }, \"model_info\": { \"id\": \"112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af\", \"db_model\": false } } ] } ``` * Model Info V1 */ modelInfoV1ModelInfoGet(requestParameters?: LitellmModelManagementApiModelInfoV1ModelInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider. * Model List */ modelListModelsGetRaw(requestParameters: LitellmModelManagementApiModelListModelsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider. * Model List */ modelListModelsGet(requestParameters?: LitellmModelManagementApiModelListModelsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * PATCH Endpoint for partial model updates. Only updates the fields specified in the request while preserving other existing values. Follows proper PATCH semantics by only modifying provided fields. Args: model_id: The ID of the model to update patch_data: The fields to update and their new values user_api_key_dict: User authentication information Returns: Updated model information Raises: ProxyException: For various error conditions including authentication and database errors * Patch Model */ patchModelModelModelIdUpdatePatchRaw(requestParameters: LitellmModelManagementApiPatchModelModelModelIdUpdatePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * PATCH Endpoint for partial model updates. Only updates the fields specified in the request while preserving other existing values. Follows proper PATCH semantics by only modifying provided fields. Args: model_id: The ID of the model to update patch_data: The fields to update and their new values user_api_key_dict: User authentication information Returns: Updated model information Raises: ProxyException: For various error conditions including authentication and database errors * Patch Model */ patchModelModelModelIdUpdatePatch(requestParameters: LitellmModelManagementApiPatchModelModelModelIdUpdatePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Edit existing model params * Update Model */ updateModelModelUpdatePostRaw(requestParameters: LitellmModelManagementApiUpdateModelModelUpdatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Edit existing model params * Update Model */ updateModelModelUpdatePost(requestParameters?: LitellmModelManagementApiUpdateModelModelUpdatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; }