mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 09:29:48 +00:00
fixing linter
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
2fb07a7034
commit
d3097ecc73
20 changed files with 122 additions and 104 deletions
|
|
@ -56,7 +56,9 @@ function getInputText(response: OpenAIResponse): string {
|
|||
}
|
||||
|
||||
function getOutputText(response: OpenAIResponse): string {
|
||||
const firstMessage = response.output.find(item => isMessageItem(item as any));
|
||||
const firstMessage = response.output.find(item =>
|
||||
isMessageItem(item as Record<string, unknown>)
|
||||
);
|
||||
if (firstMessage) {
|
||||
const content = extractContentFromItem(firstMessage as MessageItem);
|
||||
if (content) {
|
||||
|
|
@ -65,14 +67,14 @@ function getOutputText(response: OpenAIResponse): string {
|
|||
}
|
||||
|
||||
const functionCall = response.output.find(item =>
|
||||
isFunctionCallItem(item as any)
|
||||
isFunctionCallItem(item as Record<string, unknown>)
|
||||
);
|
||||
if (functionCall) {
|
||||
return formatFunctionCall(functionCall as FunctionCallItem);
|
||||
}
|
||||
|
||||
const webSearchCall = response.output.find(item =>
|
||||
isWebSearchCallItem(item as any)
|
||||
isWebSearchCallItem(item as Record<string, unknown>)
|
||||
);
|
||||
if (webSearchCall) {
|
||||
return formatWebSearchCall(webSearchCall as WebSearchCallItem);
|
||||
|
|
@ -136,7 +138,7 @@ export function ResponsesTable({ paginationOptions }: ResponsesTableProps) {
|
|||
limit: params.limit,
|
||||
...(params.model && { model: params.model }),
|
||||
...(params.order && { order: params.order }),
|
||||
} as any);
|
||||
} as Parameters<typeof client.responses.list>[0]);
|
||||
|
||||
const listResponse = response as ResponseListResponse;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue