LLM Request Types (request/types.ts)

FastGPT · packages/service/core/ai/llm/request/types.ts · typescript · Apache-2.0
ai, dev-tools, lang:typescript

Defines TypeScript type definitions and event handlers for large language model chat requests and streaming responses.

// Source: https://github.com/labring/FastGPT | License: Apache-2.0 | Copyright 2023 Sealos
// Provided via justclaw.it.com; keep this notice with the code.
import type {
  ChatCompletionCreateParams,
  ChatCompletionCreateParamsNonStreaming,
  ChatCompletionCreateParamsStreaming,
  ChatCompletionMessageParam,
  ChatCompletionMessageToolCall,
  ChatCompletionTool,
  CompletionFinishReason,
  CompletionUsage,
  OpenAI,
  StreamResponseType,
  UnStreamResponseType
} from '@fastgpt/global/core/ai/llm/type';
import type { LLMModelDataType } from '@fastgpt/global/core/ai/model/schema';
import type { OpenaiAccountType } from '@fastgpt/global/support/user/team/type';
import type { AIApiRequestMeta } from '../../config';
import type { ToolCallEventType } from '../toolCall/type';
import type { File

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key