mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
Address comments
This commit is contained in:
parent
816b68fdc7
commit
cf386ad8f8
2 changed files with 8 additions and 8 deletions
|
@ -18,14 +18,14 @@ title: Batches
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The Batches API enables efficient processing of multiple requests in a single operation,
|
The Batches API enables efficient processing of multiple requests in a single operation,
|
||||||
particularly useful for processing large datasets, batch evaluation workflows, and
|
particularly useful for processing large datasets, batch evaluation workflows, and
|
||||||
cost-effective inference at scale.
|
cost-effective inference at scale.
|
||||||
|
|
||||||
The API is designed to allow use of openai client libraries for seamless integration.
|
The API is designed to allow use of openai client libraries for seamless integration.
|
||||||
|
|
||||||
This API provides the following extensions:
|
This API provides the following extensions:
|
||||||
- idempotent batch creation
|
- idempotent batch creation
|
||||||
|
|
||||||
Note: This API is currently under active development and may undergo changes.
|
Note: This API is currently under active development and may undergo changes.
|
||||||
|
|
||||||
This section contains documentation for all available providers for the **batches** API.
|
This section contains documentation for all available providers for the **batches** API.
|
||||||
|
|
|
@ -146,7 +146,7 @@ class NVIDIAInferenceAdapter(OpenAIMixin, Inference):
|
||||||
# Convert query to text format
|
# Convert query to text format
|
||||||
if isinstance(query, str):
|
if isinstance(query, str):
|
||||||
query_text = query
|
query_text = query
|
||||||
elif hasattr(query, "text"):
|
elif isinstance(query, OpenAIChatCompletionContentPartTextParam):
|
||||||
query_text = query.text
|
query_text = query.text
|
||||||
else:
|
else:
|
||||||
raise ValueError("Query must be a string or text content part")
|
raise ValueError("Query must be a string or text content part")
|
||||||
|
@ -156,7 +156,7 @@ class NVIDIAInferenceAdapter(OpenAIMixin, Inference):
|
||||||
for item in items:
|
for item in items:
|
||||||
if isinstance(item, str):
|
if isinstance(item, str):
|
||||||
passages.append({"text": item})
|
passages.append({"text": item})
|
||||||
elif hasattr(item, "text"):
|
elif isinstance(item, OpenAIChatCompletionContentPartTextParam):
|
||||||
passages.append({"text": item.text})
|
passages.append({"text": item.text})
|
||||||
else:
|
else:
|
||||||
raise ValueError("Items must be strings or text content parts")
|
raise ValueError("Items must be strings or text content parts")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue