langchainrb 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/README.md +3 -1
- data/lib/vectorsearch/base.rb +2 -14
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cdb0b5fcbe9d764f04794320bf23e8cbea4dcd5ba7c504981c10a83cb73f09a
|
|
4
|
+
data.tar.gz: da4a97f7ae0fbc3739ee4a37f879a438773768fc1217e236508dbf370a319ade
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2be391ab8a2f2a235c4c853b1aec09a1c90fc4f537a6c98860cbbd924b07264b9173d1f28c0372440fd4c6a910c12c7d4fc1068c5ed02e744c18bedac37ed552
|
|
7
|
+
data.tar.gz: d856e73f6e4fd1df1107c3cbffd9bcaf141bfe1c1a028321ab66c8495b120d90be08d6ab982c442eda3ce4481a955b360601b1daf4754db43b0916c0214af0a2
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
langchainrb (0.1.
|
|
4
|
+
langchainrb (0.1.4)
|
|
5
5
|
cohere-ruby (~> 0.9.1)
|
|
6
6
|
milvus (~> 0.9.0)
|
|
7
7
|
pinecone (~> 0.1.6)
|
|
@@ -111,6 +111,8 @@ GEM
|
|
|
111
111
|
multipart-post (2.3.0)
|
|
112
112
|
nokogiri (1.14.3-x86_64-darwin)
|
|
113
113
|
racc (~> 1.4)
|
|
114
|
+
nokogiri (1.14.3-x86_64-linux)
|
|
115
|
+
racc (~> 1.4)
|
|
114
116
|
pinecone (0.1.71)
|
|
115
117
|
dry-struct (~> 1.6.0)
|
|
116
118
|
dry-validation (~> 1.10.0)
|
|
@@ -167,6 +169,7 @@ GEM
|
|
|
167
169
|
|
|
168
170
|
PLATFORMS
|
|
169
171
|
x86_64-darwin-19
|
|
172
|
+
x86_64-linux
|
|
170
173
|
|
|
171
174
|
DEPENDENCIES
|
|
172
175
|
dotenv-rails (~> 2.7.6)
|
data/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
---
|
|
3
3
|
⚡ Building applications with LLMs through composability ⚡
|
|
4
4
|
|
|
5
|
+
👨💻👩💻 CURRENTLY SEEKING PEOPLE TO FORM THE CORE GROUP OF MAINTAINERS WITH
|
|
6
|
+
|
|
5
7
|
:warning: UNDER ACTIVE AND RAPID DEVELOPMENT (MAY BE BUGGY AND UNTESTED)
|
|
6
8
|
|
|
7
9
|
 [](https://badge.fury.io/rb/langchainrb)
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Langchain.rb is a library that's an abstraction layer on top many emergent AI, ML and other DS tools. The goal is to abstract complexity and difficult concepts to make building AI/ML-supercharged applications approachable for traditional software engineers.
|
|
10
12
|
|
|
11
13
|
## Installation
|
|
12
14
|
|
data/lib/vectorsearch/base.rb
CHANGED
|
@@ -37,18 +37,6 @@ module Vectorsearch
|
|
|
37
37
|
:generate_completion,
|
|
38
38
|
:default_dimension
|
|
39
39
|
|
|
40
|
-
# def generate_embedding(text:)
|
|
41
|
-
# llm_client.embed(text: text)
|
|
42
|
-
# end
|
|
43
|
-
|
|
44
|
-
# def generate_completion(prompt:)
|
|
45
|
-
# llm_client.complete(prompt: prompt)
|
|
46
|
-
# end
|
|
47
|
-
|
|
48
|
-
# def default_dimension
|
|
49
|
-
# llm_client.default_dimension
|
|
50
|
-
# end
|
|
51
|
-
|
|
52
40
|
def generate_prompt(question:, context:)
|
|
53
41
|
"Context:\n" +
|
|
54
42
|
"#{context}\n" +
|
|
@@ -61,9 +49,9 @@ module Vectorsearch
|
|
|
61
49
|
private
|
|
62
50
|
|
|
63
51
|
def validate_llm!(llm:)
|
|
64
|
-
# TODO: Fix
|
|
52
|
+
# TODO: Fix so this works when `llm` value is a string instead of a symbol
|
|
65
53
|
unless LLM::Base::LLMS.keys.include?(llm)
|
|
66
|
-
raise ArgumentError, "LLM must be one of #{LLMS}"
|
|
54
|
+
raise ArgumentError, "LLM must be one of #{LLM::Base::LLMS.keys}"
|
|
67
55
|
end
|
|
68
56
|
end
|
|
69
57
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: langchainrb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Bondarev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-05-
|
|
11
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry-byebug
|