Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Content part for chat completion messages

Supported Types

models.ChatContentFile

const value: models.ChatContentFile = {
  file: {},
  type: "file",
};

models.ChatContentImage

const value: models.ChatContentImage = {
  imageUrl: {
    url: "https://vague-assist.org/",
  },
  type: "image_url",
};

models.ChatContentAudio

const value: models.ChatContentAudio = {
  inputAudio: {
    data: "<value>",
    format: "<value>",
  },
  type: "input_audio",
};

models.LegacyChatContentVideo

const value: models.LegacyChatContentVideo = {
  type: "input_video",
  videoUrl: {
    url: "https://example.com/video.mp4",
  },
};

models.ChatContentText

const value: models.ChatContentText = {
  text: "Hello, world!",
  type: "text",
};

models.ChatContentVideo

const value: models.ChatContentVideo = {
  type: "video_url",
  videoUrl: {
    url: "https://example.com/video.mp4",
  },
};