Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openai-streams

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openai-streams - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

dist/lib/types.d.ts
import type { CreateCompletionRequest, CreateEditRequest, CreateEmbeddingRequest, CreateFineTuneRequest, CreateImageRequest } from "openai";
export type StreamMode = "raw" | "tokens";
export type OpenAIAPIEndpoint = "completions" | "edits" | "embeddings" | "images" | "fine-tunes";
export type OpenAICreateArgs<T extends OpenAIAPIEndpoint> = T extends "completions" ? Exclude<CreateCompletionRequest, "stream"> : T extends "edits" ? CreateEditRequest : T extends "embeddings" ? CreateEmbeddingRequest : T extends "images" ? CreateImageRequest : T extends "fine-tunes" ? CreateFineTuneRequest : never;
export type OpenAICreateArgs<T extends OpenAIAPIEndpoint> = T extends "completions" ? Omit<CreateCompletionRequest, "stream"> : T extends "edits" ? CreateEditRequest : T extends "embeddings" ? CreateEmbeddingRequest : T extends "images" ? CreateImageRequest : T extends "fine-tunes" ? CreateFineTuneRequest : never;
export type OpenAIAPI = <T extends OpenAIAPIEndpoint>(endpoint: T, args: OpenAICreateArgs<T>, mode?: StreamMode) => Promise<ReadableStream<Uint8Array>>;
export type { CreateCompletionRequest, CreateEditRequest, CreateEmbeddingRequest, CreateFineTuneRequest, CreateImageRequest, } from "openai";
{
"name": "openai-streams",
"description": "Streams-first OpenAI API client, written in TypeScript.",
"version": "1.0.10",
"version": "1.0.11",
"license": "MIT",

@@ -6,0 +6,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc