mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 10:42:39 +00:00
error handling
This commit is contained in:
parent
3816355e1d
commit
cf672c74b0
1 changed files with 2 additions and 4 deletions
|
@ -9,7 +9,6 @@ from typing import AsyncGenerator, List, Optional, Union
|
|||
from llama_models.datatypes import CoreModelId
|
||||
from llama_models.llama3.api.chat_format import ChatFormat
|
||||
from llama_models.llama3.api.tokenizer import Tokenizer
|
||||
from termcolor import cprint
|
||||
from together import Together
|
||||
|
||||
from llama_stack.apis.common.content_types import InterleavedContent
|
||||
|
@ -181,9 +180,8 @@ class TogetherInferenceAdapter(
|
|||
|
||||
if logprobs and logprobs.top_k:
|
||||
if logprobs.top_k != 1:
|
||||
cprint(
|
||||
"Together only supports logprobs top_k=1. Overriding.",
|
||||
"Yello",
|
||||
raise ValueError(
|
||||
f"Unsupported value: Together only supports logprobs top_k=1. {logprobs.top_k} was provided",
|
||||
)
|
||||
options["logprobs"] = 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue