refactor: replace isLoading with status (#861)
This commit is contained in:
parent
8e561dced4
commit
553a3d825a
10 changed files with 72 additions and 109 deletions
|
|
@ -11,6 +11,8 @@ export const chatModel = new MockLanguageModelV1({
|
|||
}),
|
||||
doStream: async ({ prompt }) => ({
|
||||
stream: simulateReadableStream({
|
||||
chunkDelayInMs: 50,
|
||||
initialDelayInMs: 100,
|
||||
chunks: getResponseChunksByPrompt(prompt),
|
||||
}),
|
||||
rawCall: { rawPrompt: null, rawSettings: {} },
|
||||
|
|
@ -26,6 +28,8 @@ export const reasoningModel = new MockLanguageModelV1({
|
|||
}),
|
||||
doStream: async ({ prompt }) => ({
|
||||
stream: simulateReadableStream({
|
||||
chunkDelayInMs: 50,
|
||||
initialDelayInMs: 500,
|
||||
chunks: getResponseChunksByPrompt(prompt, true),
|
||||
}),
|
||||
rawCall: { rawPrompt: null, rawSettings: {} },
|
||||
|
|
@ -41,6 +45,8 @@ export const titleModel = new MockLanguageModelV1({
|
|||
}),
|
||||
doStream: async () => ({
|
||||
stream: simulateReadableStream({
|
||||
chunkDelayInMs: 50,
|
||||
initialDelayInMs: 100,
|
||||
chunks: [
|
||||
{ type: 'text-delta', textDelta: 'This is a test title' },
|
||||
{
|
||||
|
|
@ -64,6 +70,8 @@ export const artifactModel = new MockLanguageModelV1({
|
|||
}),
|
||||
doStream: async ({ prompt }) => ({
|
||||
stream: simulateReadableStream({
|
||||
chunkDelayInMs: 50,
|
||||
initialDelayInMs: 100,
|
||||
chunks: getResponseChunksByPrompt(prompt),
|
||||
}),
|
||||
rawCall: { rawPrompt: null, rawSettings: {} },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue