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

inferkit-ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferkit-ruby

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

inferkit-ruby

This gem is a Ruby wrapper for InferKit, an AI-based text generator.

Installation

gem install inferkit-ruby

Requirements

  • Ruby 3.0.0 or higher
  • An InferKit API-Key

Usage

require 'inferkit'
require 'inferkit/client'

Inferkit.configure(api_key: 'YOUR_INFERKIT_API_KEY')

client = Inferkit::Client.new
puts client.generate('This is the story of',
  length: 500,
  start_from_beginning: true,
  force_no_end: false,
  top_p: 0.8,
  temperature: 1.5
)

Configuration

You can provide your API-key as parameter when calling Inferkit.configure as in the example above. Or you can set the INFERKIT_API_KEY environment variable and call Inferkit.configure without parameter.

Generating text

You generate text by calling the generate method of Inferkit::Client and providing a text prompt. All additional parameters, such as length, are optional.

FAQs

Package last updated on 16 Apr 2021

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