Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Releases: JesusGautamah/awesome-chatgpt-actors

v0.1.3

16 Apr 23:56
70503dd
Compare
Choose a tag to compare

What's Changed

  • new way to translate prompts, add actor attributes to use as default … by @JesusGautamah in #4

  • added translated csv file to use instead in time API translation.

  • new attributes added to Actors class, use the values to configure OpenAI API Request.

Full Changelog: 0.1.2...0.1.3

v0.1.2

12 Apr 02:22
8a9f030
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.1.1...0.1.2

v0.1.1

11 Apr 23:46
e8682fa
Compare
Choose a tag to compare

Awesome Chatgpt Actors

This gem is a easy way to build actor context with Awesome Chatgpt Prompts in ruby
for Chatgpt use.
So for prompts information, please refer to that repository.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add awesome_chatgpt_actors

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install awesome_chatgpt_actors

Add to your rakefile:

require 'awesome_chatgpt_actors'

AwesomeChatgptActors.load_tasks

Run in the command line:

$ rake chatgpt_actors:install

Usage

require 'awesome_chatgpt_actors'

# Initialize a new actor
actor = AwesomeChatgptActors::Actor.new

# it will return an actor with the following options
# {
#   actor: 'Virtual Assistant',
#   prompt: 'I want you to act as a virtual assistant. I will give you tasks and you will reply with the results of the tasks. I want you to only reply with the results of the tasks, and nothing else. Do not write explanations. My first task is ""I want you to write a short story about a cat"""
# }

# Initialize a new actor with options
actor = AwesomeChatgptActors::Actor.new(
  prompt_type: 'Linux Terminal', # The type of actor to use, check the list in https://github.com/f/awesome-chatgpt-prompts/blob/main/prompts.csv
  language: 'en', # The language of the prompt, if other language is specified, it will requirean openai api key to perform the translation
)

# Initialize a new actor with options
actor = AwesomeChatgptActors::Actor.new(
  language: 'pt',
  openai_api_key: 'Your OpenAI API Key' # it can be nil if you provide it as an environment variable OPENAI_API_KEY
)

# Initialize a random actor
actor = AwesomeChatgptActors::Actor.new(
  random: true
)

# Change the actor
actor.act_as('Virtual Assistant') # it will return the same actor with the new options, check the list in https://github.com/f/awesome-chatgpt-prompts/blob/main/prompts.csv

# Add a new actor to csv file
AwesomeChatgptActors::CastControl.add_actor(actor: 'Virtual Assistant', prompt: 'I want you to act as a virtual assistant. I will give you tasks and you will reply with the results of the tasks. I want you to only reply with the results of the tasks, and nothing else. Do not write explanations. My first task is ""I want you to write a short story about a cat"""')

# Remove an actor from csv file
AwesomeChatgptActors::CastControl.remove_actor(actor: 'Virtual Assistant')

# Get a list of all actors
AwesomeChatgptActors::CastControl.actors

# Check if an actor exists
AwesomeChatgptActors::CastControl.actor_exists?(actor: 'Virtual Assistant')

# CSV file path
AwesomeChatgptActors::CastControl.csv_path # can be overriden by setting the environment variable CAST_CSV_PATH

# TEMP file path
AwesomeChatgptActors::CastControl.temp_path # can be overriden by setting the environment variable CAST_TEMP_PATH

What's Changed

New Contributors

Full Changelog: https://github.com/JesusGautamah/awesome-chatgpt-actors/commits/0.1.1