File size: 955 Bytes
cd8bd0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import type { Meta, StoryObj } from "@storybook/react";
import APIReference from "./APIReference";

const meta: Meta<typeof APIReference> = {
  title: "Docs/APIReference",
  component: APIReference,
};

export default meta;
type Story = StoryObj<typeof APIReference>;

export const Default: Story = {
  args: {
    name: "handleChat()",
    type: "async function",
    description: "Processes a chat completion request and streams the response to the client.",
    params: [
      {
        name: "request",
        type: "ChatRequest",
        description: "The structured request containing messages and model config.",
      },
      {
        name: "options",
        type: "RequestOptions",
        description: "Optional overrides for the request pipeline.",
      },
    ],
    returns: {
      type: "Promise<SSEStream>",
      description:
        "A promise that resolves to a Server-Sent Events stream containing model chunks.",
    },
  },
};