omniai 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 54cb0309adb2c49473342a47f964d2ddb8035a42d8d8fe1d9fa6960ac0987cf4
4
+ data.tar.gz: 5f6792e26172ad6383308cd98501d6b53f4607411efba7317d90c6525fbb2473
5
+ SHA512:
6
+ metadata.gz: f065076a409f5acc450eb020edbeb840d1f66ece51085b8493e2663132210e38cf02d12709e5932ecdeef88f50c8e61541c9b0d676281e7cd22e397ae9cb4f30
7
+ data.tar.gz: c44b00b48485d903c9f44f63137367fc71a0bf97c38d1d80274f8a51073339125ddbfeb1a427bbd459b496e4fe1c8f7921c5e5c7534af1499a2471621c3be6d5
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Omniai
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/omniai`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/omniai.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Usage:
4
+ #
5
+ # require "omniai"
6
+ # require "omniai-anthropic"
7
+ # require "omniai-google"
8
+ # require "omniai-mistral"
9
+ # require "omniai-openai"
10
+ #
11
+ # anthropic = OmniAI::Anthropic.new(api_key: ENV.fetch("OPENAI_API_KEY"))
12
+ # google = OmniAI::Google.new(api_key: ENV.fetch("OPENAI_API_KEY"))
13
+ # mistral = OmniAI::Mistral.new(api_key: ENV.fetch("OPENAI_API_KEY"))
14
+ # openai = OmniAI::OpenAI.new(api_key: ENV.fetch("OPENAI_API_KEY"))
15
+
16
+ module OmniAI::Client
17
+ class Error < StandardError; end
18
+
19
+ # @param api_key [String] The API key to use for requests
20
+ def initialize(api_key:)
21
+ @api_key = api_key
22
+ end
23
+
24
+ def http
25
+ HTTP.auth("Bearer #{@api_key}")
26
+ end
27
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniAI
4
+ VERSION = "0.0.1"
5
+ end
data/lib/omniai.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "omniai/version"
4
+
5
+ module OmniAI
6
+ class Error < StandardError; end
7
+ end
data/sig/omniai.rbs ADDED
@@ -0,0 +1,3 @@
1
+ module OmniAI
2
+ VERSION: String
3
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniai
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kevin Sylvestre
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-06-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: http
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Gives a consistent interface for interacting with OpenAI's ChatGPT, Google's
56
+ Gemini, Anthropic's Claude, Mistral's LeChat, and more.
57
+ email:
58
+ - kevin@ksylvest.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".rspec"
64
+ - ".rubocop.yml"
65
+ - README.md
66
+ - Rakefile
67
+ - lib/omniai.rb
68
+ - lib/omniai/client.rb
69
+ - lib/omniai/version.rb
70
+ - sig/omniai.rbs
71
+ homepage: https://github.com/ksylvest/omniai
72
+ licenses: []
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.0
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubygems_version: 3.5.11
90
+ signing_key:
91
+ specification_version: 4
92
+ summary: A generalized framework for interacting with many AI services
93
+ test_files: []