fixing safety inference and safety adapter for new API spec. Pinned t… (#105)

* fixing safety inference and safety adapter for new API spec. Pinned the llama_models version to 0.0.24 as the latest version 0.0.35 has the model descriptor name changed. I was getting the missing package error during runtime as well, hence added the dependency to requirements.txt

* support Llama 3.2 models in Together inference adapter and cleanup Together safety adapter

* fixing model names

* adding vision guard to Together safety
This commit is contained in:
Yogish Baliga 2024-09-28 15:45:38 -07:00 committed by GitHub
parent 0a3999a9a4
commit 940968ee3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 68 additions and 40 deletions

View file

@ -4,17 +4,8 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from pydantic import BaseModel, Field
from llama_models.schema_utils import json_schema_type
from llama_stack.distribution.request_headers import annotate_header
class TogetherHeaderExtractor(BaseModel):
api_key: annotate_header(
"X-LlamaStack-Together-ApiKey", str, "The API Key for the request"
)
from pydantic import BaseModel, Field
@json_schema_type