New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hypermode/models-as

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hypermode/models-as - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

13

models/meta/llama.ts
import { Model } from "../..";
export default class LlamaModel extends Model<LlamaInput, LlamaOutput> {
export class TextGenerationModel extends Model<
TextGenerationInput,
TextGenerationOutput
> {
/**

@@ -11,4 +14,4 @@ * Creates a new input object for the model.

*/
createInput(prompt: string): LlamaInput {
return <LlamaInput>{ prompt };
createInput(prompt: string): TextGenerationInput {
return <TextGenerationInput>{ prompt };
}

@@ -19,3 +22,3 @@ }

@json
class LlamaInput {
class TextGenerationInput {
/**

@@ -60,3 +63,3 @@ * The prompt text to pass to the model.

@json
class LlamaOutput {
class TextGenerationOutput {
/**

@@ -63,0 +66,0 @@ * The generated text.

@@ -5,9 +5,6 @@ import { Model } from "../..";

export default class ChatCompletionModel extends Model<
ChatCompletionInput,
ChatCompletionOutput
> {
createInput(messages: Message[]): ChatCompletionInput {
export class ChatModel extends Model<ChatInput, ChatOutput> {
createInput(messages: Message[]): ChatInput {
const model = this.info.fullName;
return <ChatCompletionInput>{ model, messages };
return <ChatInput>{ model, messages };
}

@@ -18,3 +15,3 @@ }

@json
class ChatCompletionInput {
class ChatInput {
model!: string;

@@ -104,3 +101,3 @@ messages!: Message[];

@json
class ChatCompletionOutput {
class ChatOutput {
id!: string;

@@ -107,0 +104,0 @@ object!: string;

@@ -5,6 +5,3 @@ import { Model } from "../..";

export default class EmbeddingsModel extends Model<
EmbeddingsInput,
EmbeddingsOutput
> {
export class EmbeddingsModel extends Model<EmbeddingsInput, EmbeddingsOutput> {
createInput(text: string): EmbeddingsInput {

@@ -11,0 +8,0 @@ const model = this.info.fullName;

{
"name": "@hypermode/models-as",
"version": "0.1.5",
"version": "0.1.6",
"description": "Hypermode Model Interface Library for AssemblyScript",

@@ -5,0 +5,0 @@ "author": "Hypermode, Inc.",

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