ruby_bots 0.0.25 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_bots/streamable.rb +11 -0
- data/lib/ruby_bots/version.rb +1 -1
- data/lib/ruby_bots.rb +1 -0
- metadata +3 -3
- data/lib/ruby_bots/tools/wolfram_tool.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 661bc338ef1cc7a60d6a4b3076c194faaf1c71d21db937d1de05fbfcaa9bc899
|
4
|
+
data.tar.gz: b721ca417c4bf4762b1462b2f1672452a7e27ee46b1fec3b35ec369167de7e5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf2275c793c811c194e4c25e5497ba16a8eb54898b487e53159f966352ea71041d3324717b2f99b4fd1611c1244ed5344422fe15779a8317759b3142ba8097cf
|
7
|
+
data.tar.gz: 5532942135eea17d71566e52609f30327da76de6a1be7e3a1e108d7cab31e9576d452edda5ff92c6c829fb25bc87dcddf7f5eb57c5c1c1eeee8b0617d0afcbb6
|
data/lib/ruby_bots/version.rb
CHANGED
data/lib/ruby_bots.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_bots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Paulson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -94,9 +94,9 @@ files:
|
|
94
94
|
- lib/ruby_bots/bots/openai_react_bot.rb
|
95
95
|
- lib/ruby_bots/bots/pipeline_bot.rb
|
96
96
|
- lib/ruby_bots/bots/router_bot.rb
|
97
|
+
- lib/ruby_bots/streamable.rb
|
97
98
|
- lib/ruby_bots/tool.rb
|
98
99
|
- lib/ruby_bots/tools/openai_tool.rb
|
99
|
-
- lib/ruby_bots/tools/wolfram_tool.rb
|
100
100
|
- lib/ruby_bots/version.rb
|
101
101
|
homepage: https://github.com/aha-app/ruby_bots
|
102
102
|
licenses:
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
require 'uri'
|
3
|
-
require 'net/http'
|
4
|
-
|
5
|
-
module RubyBots
|
6
|
-
# This tool provides an interface to get responses from the Wolfram Alpha API.
|
7
|
-
# This tool requires an App ID key from Wolfram Alpha.
|
8
|
-
# add it to your environment variables as WOLFRAM_APP_ID
|
9
|
-
# it is currently alpha and not fully working or tested.
|
10
|
-
class WolframTool < Tool
|
11
|
-
DEFAULT_DESCRIPTION = 'This tool will use the Wolfram Alpha API to answer questions.'.freeze
|
12
|
-
|
13
|
-
def initialize(name: 'Wolfram tool', description: DEFAULT_DESCRIPTION)
|
14
|
-
super(name:, description:)
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def run(input)
|
20
|
-
uri = URI("http://api.wolframalpha.com/v1/simple?appid=#{ENV['WOLFRAM_APPID']}&i=#{CGI.escape(input)}")
|
21
|
-
resp = Net::HTTP.get_response(uri)
|
22
|
-
resp.body
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|