add deepinfra inference provider

This commit is contained in:
Iskren Chernev 2024-10-09 17:07:52 +03:00
parent 6b094b72d3
commit 4a336ca8ba
5 changed files with 321 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import Optional
from llama_models.schema_utils import json_schema_type
from pydantic import BaseModel, Field
@json_schema_type
class DeepInfraImplConfig(BaseModel):
url: str = Field(
default="https://api.deepinfra.com/v1/openai",
description="The URL for the DeepInfra model serving endpoint",
)
api_token: str = Field(
default=None,
description="The DeepInfra API token",
)