everyai 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/everyai.rb +14 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa438268e9b3cb45cb751cb6e0807022f02b6c8b138938bb7829ad7452aaf8bc
4
- data.tar.gz: 7edf18ad5900e05b0aac9cba2870237dcfabae66551d528424e15a433089228a
3
+ metadata.gz: 0e34063bbc0fe6f0e542cea2aaddf8cd6e1672711ffc4ba4d943fdc5e151ca72
4
+ data.tar.gz: 565d0a57a5010b82912a6b2cd317d76fd43f77a2e14bac13db645bd5d9687dab
5
5
  SHA512:
6
- metadata.gz: 820b9c4ea76666f6ec035bf3b1987effbbaf777b5162fe91697792a8c8a1843e8d82c8aad9ebce5df083b670ba55fd5944a25d0ffdf07d39f37ac30b55c12541
7
- data.tar.gz: 267259d18160ce44229e72c09ec5d5f8bb109427fd1986d98d48846cdcd16daea7c54ad980464e8d5f1a579b9ebc3c48fc70a5f40fd39d22067bea609916aeb4
6
+ metadata.gz: 34cfb4e39a7ee9d63658daaa7ab55c9eaac756413fbf387c35f18b75c85db66fb1080aa06f98c2c6087ab7b8ea7fe4e6beaa700e909d3635d904e534b0e86925
7
+ data.tar.gz: 9681df02cac08959f37f5ff9e89b43c9a619f23f31a43603593233d9a128ba77cd72b5739ddad2471d4e50b18c8b88a33462cecd87f0639ba021a5fccc6e33aa
data/lib/everyai.rb CHANGED
@@ -3,7 +3,8 @@ require 'uri'
3
3
  require 'json'
4
4
 
5
5
  class Everyai
6
- API_GENERATIONS_PATH = "http://every-llm.com/api/v1/generations"
6
+ DOMAIN = "http://localhost:3000" #"https://every-llm.com"
7
+ API_GENERATIONS_PATH = "#{DOMAIN}/api/v1/generations"
7
8
 
8
9
  class << self
9
10
  @api_key = nil
@@ -26,5 +27,17 @@ class Everyai
26
27
  body["errors"]
27
28
  end
28
29
  end
30
+
31
+ def chatgpt(prompt, model: "chatgpt")
32
+ generate(prompt, model: model )
33
+ end
34
+
35
+ def llama(prompt, model: "llama3.1")
36
+ generate(prompt, model: model)
37
+ end
38
+
39
+ def anthropic(prompt, model: "anthropic")
40
+ generate(prompt, model: model)
41
+ end
29
42
  end
30
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everyai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enoch Tamulonis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-07 00:00:00.000000000 Z
12
+ date: 2024-09-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This ruby gem allows you to connect to any AI model with one simple interface.
15
15
  Never worry about configuration and installing libraries. We make connecting to