Elffuss BraidHub

kikocis/llama-stack public

main · 809 BRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7from pydantic import BaseModel, Field
8
9from llama_models.schema_utils import json_schema_type
10
11from llama_stack.distribution.request_headers import annotate_header
12
13
14class TogetherHeaderExtractor(BaseModel):
15 api_key: annotate_header(
16 "X-LlamaStack-Together-ApiKey", str, "The API Key for the request"
17 )
18
19
20@json_schema_type
21class TogetherImplConfig(BaseModel):
22 url: str = Field(
23 default="https://api.together.xyz/v1",
24 description="The URL for the Together AI server",
25 )
26 api_key: str = Field(
27 default="",
28 description="The Together AI API Key",
29 )