0.0
No commit activity in last 3 years
No release in over 3 years
This gem is a Ruby wrapper for InferKit, an AI-based text generator.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0
>= 1.0.0
>= 0.5.1
>= 3.0.0

Runtime

~> 3.10
~> 1.0
 Project Readme

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.