1.1.1 • Published 10 months ago

@commit-generator/ai-models v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@commit-generator/ai-models

This package provides AI models and schemas for the Commit Generator project. Currently, it supports models from OpenAI and Ollama.

Installation

To use the AI models and schemas in your project, install the package:

pnpm install @commit-generator/ai-models

Usage

After installation, you can use the AI models and schemas in your project.

  1. Using AI Models The available models are OpenAI and Ollama. To create an AI model, use the createAIModel function, specifying the provider and parameters:
import { createAIModel } from '@commit-generator/ai-models';

const provider = "openai";  // Available models: "openai" or "ollama"

const params = {
  key: "some_key",
};

const model = createAIModel(provider, params);

const result = await model.complete("Hello");
console.log(result);
  1. Extending Schemas
import { aiModelSchemes, IAIModelSchemes } from '@commit-generator/ai-models/schemes';

console.log(aiModelSchemes.openai);

export type IType = {
  myProperties: Array<string>
} & Partial<IAIModelSchemes>;

License

This package is licensed under the MIT License.

1.1.1

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.0

10 months ago