mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-06 20:44:58 +00:00
revert: do not use MySecretStr
We don't need this if we can set it to empty string. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
bc64635835
commit
2a34226727
86 changed files with 208 additions and 263 deletions
|
@ -8,6 +8,7 @@
|
|||
from collections.abc import AsyncGenerator
|
||||
|
||||
from huggingface_hub import AsyncInferenceClient, HfApi
|
||||
from pydantic import SecretStr
|
||||
|
||||
from llama_stack.apis.common.content_types import (
|
||||
InterleavedContent,
|
||||
|
@ -34,7 +35,6 @@ from llama_stack.apis.inference import (
|
|||
)
|
||||
from llama_stack.apis.models import Model
|
||||
from llama_stack.apis.models.models import ModelType
|
||||
from llama_stack.core.secret_types import MySecretStr
|
||||
from llama_stack.log import get_logger
|
||||
from llama_stack.models.llama.sku_list import all_registered_models
|
||||
from llama_stack.providers.datatypes import ModelsProtocolPrivate
|
||||
|
@ -79,7 +79,7 @@ class _HfAdapter(
|
|||
ModelsProtocolPrivate,
|
||||
):
|
||||
url: str
|
||||
api_key: MySecretStr
|
||||
api_key: SecretStr
|
||||
|
||||
hf_client: AsyncInferenceClient
|
||||
max_tokens: int
|
||||
|
@ -337,7 +337,7 @@ class TGIAdapter(_HfAdapter):
|
|||
self.max_tokens = endpoint_info["max_total_tokens"]
|
||||
self.model_id = endpoint_info["model_id"]
|
||||
self.url = f"{config.url.rstrip('/')}/v1"
|
||||
self.api_key = MySecretStr("NO_KEY")
|
||||
self.api_key = SecretStr("NO_KEY")
|
||||
|
||||
|
||||
class InferenceAPIAdapter(_HfAdapter):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue