toOpenAISdkReasoningEffort (openai-common.ts)

open-multi-agent · ai

@fileoverview Shared OpenAI wire-format conversion helpers. Both the OpenAI and Copilot adapters use the OpenAI Chat Completions API format. This module contains the common conversion logic so it isn't duplicated across adapters. /

// Source: https://github.com/open-multi-agent/open-multi-agent | License: MIT | Copyright Shenzhen YuanASI Technology Co., Ltd. and open-multi-agent contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * @fileoverview Shared OpenAI wire-format conversion helpers.
 *
 * Both the OpenAI and Copilot adapters use the OpenAI Chat Completions API
 * format. This module contains the common conversion logic so it isn't
 * duplicated across adapters.
 */

import OpenAI from 'openai'
import type {
  ChatCompletion,
  ChatCompletionAssistantMessageParam,
  ChatCompletionMessageParam,
  ChatCompletionMessageToolCall,
  ChatCompletionTool,
  ChatCompletionToolMessageParam,
  ChatCompletionUserMessageParam,
} from 'openai/resources/chat/completions/index.js'

import type {

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

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

Get a free API key