Fixes; make inference tests pass with newer tool call types

This commit is contained in:
Ashwin Bharambe 2025-01-13 23:16:16 -08:00
parent d9d34433fc
commit 2c2969f331
5 changed files with 24 additions and 25 deletions

View file

@ -35,7 +35,7 @@ class DistributionRegistry(Protocol):
REGISTER_PREFIX = "distributions:registry"
KEY_VERSION = "v4"
KEY_VERSION = "v5"
KEY_FORMAT = f"{REGISTER_PREFIX}:{KEY_VERSION}::" + "{type}:{identifier}"

View file

@ -142,7 +142,7 @@ async def process_completion_stream_response(
text = ""
continue
yield CompletionResponseStreamChunk(
delta=TextDelta(text=text),
delta=text,
stop_reason=stop_reason,
)
if finish_reason:
@ -153,7 +153,7 @@ async def process_completion_stream_response(
break
yield CompletionResponseStreamChunk(
delta=TextDelta(text=""),
delta="",
stop_reason=stop_reason,
)

View file

@ -265,6 +265,7 @@ def chat_completion_request_to_messages(
For eg. for llama_3_1, add system message with the appropriate tools or
add user messsage for custom tools, etc.
"""
assert llama_model is not None, "llama_model is required"
model = resolve_model(llama_model)
if model is None:
log.error(f"Could not resolve model {llama_model}")