everyai 0.0.0

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 +7 -0
  2. data/lib/everyai.rb +18 -0
  3. metadata +61 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 84a4a9deb6315f3817a631aa86f93a8c4be163b9b05508383907a32aabb42d89
4
+ data.tar.gz: 69e82ad21f67ebab33f563e52c5ff8ff8d86940d84ff76681a96107ca3dd3af2
5
+ SHA512:
6
+ metadata.gz: e667fccccf7eeb8b303224946b169ac6fb4d7617de4f0fbf803525469c123646e865c19a2f27483084ed50851dfe35f45bf8ac311952720aea47f7f20703722f
7
+ data.tar.gz: 4aca7a987e8a214979a3a8f7cec8acd9f331933b993a9f1069f7c388e50ec3a5d7944ed5f19a7849809d59a954b9fe1fb762549a2feea0b4fcfbf1bb95220081
data/lib/everyai.rb ADDED
@@ -0,0 +1,18 @@
1
+ require "ollama-ai"
2
+
3
+ class Everyai
4
+ class << self
5
+ def generate(prompt, model: "llama3.1")
6
+ client = Ollama.new(
7
+ credentials: { address: 'http://localhost:11434' },
8
+ opiions: { server_sent_events: true }
9
+ )
10
+
11
+ result = client.generate(
12
+ { model: model,
13
+ prompt: prompt }
14
+ )
15
+ result.map { |r| r['response']}.join
16
+ end
17
+ end
18
+ end
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: everyai
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Enoch Tamulonis
8
+ - Kurt Tamulonis
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2024-09-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ollama-ai
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 1.3.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 1.3.0
28
+ description: This ruby gem allows you to connect to any AI model with one simple interface.
29
+ Never worry about configuration and installing libraries. We make connecting to
30
+ multiple AI models simple
31
+ email: enochtamulonis@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/everyai.rb
37
+ homepage: https://rubygems.org/gems/everyai
38
+ licenses:
39
+ - MIT
40
+ metadata:
41
+ source_code_uri: https://github.com/Every-LLM/every-ai-gem
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubygems_version: 3.5.7
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: Every AI ruby gem. Connect to any AI model easily
61
+ test_files: []