@hypermode/models-as
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -8,3 +8,3 @@ import { Model } from "../.."; | ||
*/ | ||
export class ChatModel extends Model<ChatInput, ChatOutput> { | ||
export class OpenAIChatModel extends Model<OpenAIChatInput, OpenAIChatOutput> { | ||
/** | ||
@@ -16,5 +16,5 @@ * Creates an input object for the OpenAI Chat API. | ||
*/ | ||
createInput(messages: Message[]): ChatInput { | ||
createInput(messages: Message[]): OpenAIChatInput { | ||
const model = this.info.fullName; | ||
return <ChatInput>{ model, messages }; | ||
return <OpenAIChatInput>{ model, messages }; | ||
} | ||
@@ -27,3 +27,3 @@ } | ||
@json | ||
class ChatInput { | ||
class OpenAIChatInput { | ||
/** | ||
@@ -240,3 +240,3 @@ * The name of the model to use for the chat. | ||
@json | ||
class ChatOutput { | ||
class OpenAIChatOutput { | ||
/** | ||
@@ -243,0 +243,0 @@ * A unique identifier for the chat completion. |
@@ -8,3 +8,6 @@ import { Model } from "../.."; | ||
*/ | ||
export class EmbeddingsModel extends Model<EmbeddingsInput, EmbeddingsOutput> { | ||
export class OpenAIEmbeddingsModel extends Model< | ||
OpenAIEmbeddingsInput, | ||
OpenAIEmbeddingsOutput | ||
> { | ||
/** | ||
@@ -24,3 +27,3 @@ * Creates an input object for the OpenAI Embeddings API. | ||
*/ | ||
createInput<T>(content: T): EmbeddingsInput { | ||
createInput<T>(content: T): OpenAIEmbeddingsInput { | ||
const model = this.info.fullName; | ||
@@ -58,3 +61,3 @@ | ||
@json | ||
class EmbeddingsInput { | ||
class OpenAIEmbeddingsInput { | ||
/** | ||
@@ -103,3 +106,3 @@ * The name of the model to use for the embeddings. | ||
@json | ||
class TypedEmbeddingsInput<T> extends EmbeddingsInput { | ||
class TypedEmbeddingsInput<T> extends OpenAIEmbeddingsInput { | ||
/** | ||
@@ -115,3 +118,3 @@ * The input content to vectorize. | ||
@json | ||
class EmbeddingsOutput { | ||
class OpenAIEmbeddingsOutput { | ||
/** | ||
@@ -118,0 +121,0 @@ * The name of the output object type returned by the API. |
{ | ||
"name": "@hypermode/models-as", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Hypermode Model Interface Library for AssemblyScript", | ||
@@ -5,0 +5,0 @@ "author": "Hypermode, Inc.", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31507
1015
0