Amplication
Platform
Solutions
Learn
Star Us 12.7K
Log In to Amplication

Contact us

  • contact@amplication.com
Try Overcut.ai
  • Home /
  • Plugins /
  • Open AI Integration
plugin logo
Open AI Integration
Install Plugin

@amplication/plugin-integrate-openai

NPM Downloads

Adds a service to use OpenAI API

Purpose

This plugin adds a module and a service to use OpenAI API, and adds the openai package as a dependency. It expose a single function createChatCompletion that can be used to create a chat completion using the OpenAI API.

const result = await this.openaiService.createChatCompletion(
  "gpt-3.5-turbo",
  [
    {
      role: "system",
      content: "This is a test system message",
    },
    {
      role: "user",
      content: "This is a test user message",
    },
  ],
  {
    temperature: 1,
    max_tokens: 2048,
    top_p: 1,
    frequency_penalty: 0,
    presence_penalty: 0,
  }
);

Configuration

This plugin requires the following environment variables: OPENAI_API_KEY=[open-ai-key]

Note: For development purposes, the plugin adds the variable to the .env file, but you should never use .env to hold secrets in production, and you should never check in a secrets file to source control. You should use a secrets manager like AWS Secrets Manager or Azure Key Vault to store secrets.

Details
npm
@amplication/plugin-integrate-openai
github
https://github.com/amplication/plugins/tree/master/plugins/integration-openai
Installs
243
Categories
AI
Documentation
https://github.com/amplication/plugins/tree/master/plugins/integration-openai

Get started with Amplication and Open AI Integration

Start NowBook a demo

Platform

Live TemplatesPluginsJovu

Solutions

Enhance platform engineeringBuild new servicesBuild APIs on existing DBModernize applications

Customers

IT ServicesRetailHealthcareManufacturingCustomer stories

Use Amplication

Get started Custom pluginsCustom codeSync with GitEvent-driven architectureBreak the monolith

Resources

DocsCustomer storiesPlugins catalogDiscord communityGitHubBlog

About

CompanyContact us

©2025 amplication

Privacy PolicyTerms & Conditions
Follow usTwitter IconYouTube Icon