mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 02:39:49 +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
|
|
@ -53,7 +53,7 @@ describe("extractTextFromContentPart", () => {
|
|||
});
|
||||
|
||||
it("should handle arrays with plain strings", () => {
|
||||
const content = ["This is", " a test."] as any;
|
||||
const content = ["This is", " a test."] as unknown;
|
||||
expect(extractTextFromContentPart(content)).toBe("This is a test.");
|
||||
});
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ describe("extractTextFromContentPart", () => {
|
|||
null,
|
||||
undefined,
|
||||
{ type: "text", noTextProperty: true },
|
||||
] as any;
|
||||
] as unknown;
|
||||
expect(extractTextFromContentPart(content)).toBe("Valid");
|
||||
});
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ describe("extractTextFromContentPart", () => {
|
|||
"Just a string.",
|
||||
{ type: "image_url", image_url: { url: "http://example.com/image.png" } },
|
||||
{ type: "text", text: "Last part." },
|
||||
] as any;
|
||||
] as unknown;
|
||||
expect(extractTextFromContentPart(content)).toBe(
|
||||
"First part. Just a string. [Image] Last part."
|
||||
);
|
||||
|
|
@ -83,7 +83,9 @@ describe("extractTextFromContentPart", () => {
|
|||
});
|
||||
|
||||
describe("extractDisplayableText (composite function)", () => {
|
||||
const mockFormatToolCallToString = (toolCall: any) => {
|
||||
const mockFormatToolCallToString = (toolCall: {
|
||||
function?: { name?: string; arguments?: unknown };
|
||||
}) => {
|
||||
if (!toolCall || !toolCall.function || !toolCall.function.name) return "";
|
||||
const args = toolCall.function.arguments
|
||||
? JSON.stringify(toolCall.function.arguments)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue