From 77540f53c0a068c9a94e18f01fd2c6918e96e267 Mon Sep 17 00:00:00 2001 From: Alex Shapalov Date: Tue, 22 Oct 2024 12:46:15 -0700 Subject: [PATCH] Update Rubygems file amd dep --- lib/rubyai.rb | 6 +++++- lib/rubyai/client.rb | 3 --- lib/rubyai/configuration.rb | 3 --- lib/rubyai/http.rb | 2 -- rubyai.gemspec | 17 ++++++++++++++++- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lib/rubyai.rb b/lib/rubyai.rb index 79e664f..e29d903 100644 --- a/lib/rubyai.rb +++ b/lib/rubyai.rb @@ -1,6 +1,10 @@ require_relative "rubyai/client" require_relative "rubyai/configuration" +require_relative "rubyai/http" +require_relative "rubyai/version" + +require 'faraday' module RubyAI class Error < StandardError; end -end \ No newline at end of file +end diff --git a/lib/rubyai/client.rb b/lib/rubyai/client.rb index d9e7c8d..6cbc096 100644 --- a/lib/rubyai/client.rb +++ b/lib/rubyai/client.rb @@ -1,6 +1,3 @@ -require_relative 'configuration' -require_relative 'http' - module RubyAI class Client attr_reader :configuration diff --git a/lib/rubyai/configuration.rb b/lib/rubyai/configuration.rb index 75e19e4..ed0bc1b 100644 --- a/lib/rubyai/configuration.rb +++ b/lib/rubyai/configuration.rb @@ -1,6 +1,3 @@ -require 'faraday' -require 'json' - module RubyAI class Configuration BASE_URL = "https://api.openai.com/v1/chat/completions" diff --git a/lib/rubyai/http.rb b/lib/rubyai/http.rb index 7401f98..cd73806 100644 --- a/lib/rubyai/http.rb +++ b/lib/rubyai/http.rb @@ -1,5 +1,3 @@ -require_relative 'configuration' - module RubyAI module HTTP extend self diff --git a/rubyai.gemspec b/rubyai.gemspec index e2d19f5..cc26473 100644 --- a/rubyai.gemspec +++ b/rubyai.gemspec @@ -2,8 +2,23 @@ Gem::Specification.new do |s| s.name = "rubyai" s.version = "0.3.1" s.summary = "A Ruby gem for the OpenAI (GPT-3 and GPT-4) API" + s.description = "RubyAI is a wrapper for the OpenAI API that allows you to interact with GPT-3 and GPT-4 from within Ruby applications. It provides simple methods for integrating language model capabilities into your Ruby projects." s.homepage = "https://github.com/alexshapalov/rubyai" s.authors = ["Alex Shapalov"] - s.files = ["lib/rubyai.rb"] + s.email = "alex@example.com" # Optional, but often useful s.license = "MIT" + + s.files = Dir.glob("**/*").select { |f| File.file?(f) } + ["README.md", "LICENSE.txt"] + + s.require_paths = ["."] + s.required_ruby_version = ">= 2.6" + + s.add_dependency "faraday", "~> 2.0" + s.add_development_dependency "rspec", "~> 3.10" + + s.metadata = { + "source_code_uri" => "https://github.com/alexshapalov/rubyai", + "changelog_uri" => "https://github.com/alexshapalov/rubyai/CHANGELOG.md", + "documentation_uri" => "https://github.com/alexshapalov/rubyai#readme" + } end