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

strapi-provider-translate-chatgpt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-provider-translate-chatgpt

ChatGPT provider for translate plugin in Strapi 4

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-61.54%
Maintainers
1
Weekly downloads
 
Created
Source

ChatGPT provider for Strapi Translate Plugin

Configure the provider through the pluginOptions:

module.exports = {
  // ...
  translate: {
    enabled: true,
    config: {
      // Choose one of the available providers
      provider: 'chatgpt',
      // Pass credentials and other options to the provider
      providerOptions: {
        // your API key - required and wil cause errors if not provided
        apiKey: 'sk-...',
        // use base path - default: 'https://api.openai.com/v1'
        basePath: 'https://api.openai.com/v1',
        // model - default: 'text-davinci-003'
        model: 'text-davinci-003', 
        // max tokens used per one translate operation - default: 1000 
        maxTokens: 1000,
        // use custom locale mapping (for example 'en' locale is deprecated so need to choose between 'EN-GB' and 'EN-US')
        localeMap: {
          // use uppercase here!
          EN: 'EN-US',
        },
          
      },
      // other options ...
    },
  },
  // ...
}

or use the default environment variables:

  • OPENAI_API_KEY - default undefined
  • OPENAI_MODEL - default text-davinci-003
  • OPENAI_BASE_PATH - default https://api.openai.com/v1
  • OPENAI_MAX_TOKENS - default 1000

To get an API key, register for platform.openai.com/account/api-keys.

Limitations:

To be described

Keywords

FAQs

Package last updated on 18 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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