@singlestore/ai
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -17,8 +17,8 @@ import { OpenAI } from 'openai'; | ||
type ChatCompletionOptions = { | ||
systemRole?: string; | ||
stream?: boolean; | ||
history?: ChatCompletionMessage[]; | ||
systemRole: string; | ||
stream: boolean; | ||
history: ChatCompletionMessage[]; | ||
}; | ||
interface LLM { | ||
createChatCompletion<T extends ChatCompletionOptions & { | ||
createChatCompletion<T extends Partial<ChatCompletionOptions> & { | ||
[K: string]: any; | ||
@@ -31,6 +31,3 @@ }>(prompt: string, options?: T): Promise<T extends { | ||
type CreateChatCompletionOptions = Partial<Omit<ChatCompletionCreateParams, "input">> & { | ||
systemRole?: string; | ||
history?: ChatCompletionMessage[]; | ||
}; | ||
type CreateChatCompletionOptions = Partial<ChatCompletionOptions> & Partial<Omit<ChatCompletionCreateParams, "input" | keyof ChatCompletionOptions>>; | ||
declare class OpenAILLM implements LLM { | ||
@@ -46,7 +43,7 @@ private _openai; | ||
type AIConfig = { | ||
llm?: LLM; | ||
embedder?: Embedder; | ||
openAIApiKey?: string; | ||
llm: LLM; | ||
embedder: Embedder; | ||
openAIApiKey: string; | ||
}; | ||
declare class AI<T extends AIConfig = AIConfig> { | ||
declare class AI<T extends Partial<AIConfig> = Partial<AIConfig>> { | ||
llm: T extends { | ||
@@ -53,0 +50,0 @@ llm: LLM; |
{ | ||
"name": "@singlestore/ai", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31260
410