@guard-sdk/openai API

This spec is generated from package entry exports and updates on every website build.

Need package context first? Visit @guard-sdk/openai package docs.

Exported Symbols

Kind Name Source
type OpenAIChatCompletionCreateParams entry
type OpenAIClientLike entry
type OpenAIGuardConfig entry
function createOpenAIGuard entry

Export Declarations

export type OpenAIChatCompletionCreateParams = { model?: string;
export type OpenAIClientLike<TParams extends OpenAIChatCompletionCreateParams, TResponse> = { chat: { completions: { create: (params: TParams) => Promise<TResponse>;
export type OpenAIGuardConfig = Omit<GuardConfig, "provider" | "model"> & { model?: string;
export declare function createOpenAIGuard<TParams extends OpenAIChatCompletionCreateParams, TResponse, TClient extends OpenAIClientLike<TParams, TResponse>>(client: TClient, defaultConfig?: OpenAIGuardConfig): TClient & { chat: { completions: { create: (params: TParams, overrides?: OpenAIGuardConfig) => Promise<TResponse>;

JSON Spec

{
  "package": "@guard-sdk/openai",
  "version": "0.5.0",
  "exports": [
    {
      "kind": "type",
      "name": "OpenAIChatCompletionCreateParams",
      "source": null
    },
    {
      "kind": "type",
      "name": "OpenAIClientLike",
      "source": null
    },
    {
      "kind": "type",
      "name": "OpenAIGuardConfig",
      "source": null
    },
    {
      "kind": "function",
      "name": "createOpenAIGuard",
      "source": null
    }
  ]
}