File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed
lib/langchainrb_overrides/vectorsearch Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 22 remote: .
33 specs:
44 langchainrb_rails (0.1.8 )
5- langchainrb (>= 0.7 , < 0.11 )
5+ langchainrb (>= 0.7 , < 0.12 )
66
77GEM
88 remote: https://rubygems.org/
@@ -112,16 +112,16 @@ GEM
112112 rdoc
113113 reline (>= 0.4.2 )
114114 json (2.7.2 )
115- json-schema (4.2 .0 )
115+ json-schema (4.3 .0 )
116116 addressable (>= 2.8 )
117- langchainrb (0.10.0 )
117+ langchainrb (0.11.2 )
118118 activesupport (>= 7.0.8 )
119119 baran (~> 0.1.9 )
120120 colorize (~> 1.1.0 )
121121 json-schema (~> 4 )
122122 matrix
123123 pragmatic_segmenter (~> 0.3.0 )
124- tiktoken_ruby (~> 0.0.7 )
124+ tiktoken_ruby (~> 0.0.8 )
125125 to_bool (~> 2.0.0 )
126126 zeitwerk (~> 2.5 )
127127 language_server-protocol (3.17.0.3 )
172172 pry (>= 0.13 , < 0.15 )
173173 psych (5.1.2 )
174174 stringio
175- public_suffix (5.0.4 )
175+ public_suffix (5.0.5 )
176176 racc (1.7.3 )
177177 rack (3.0.9.1 )
178178 rack-session (2.0.0 )
213213 zeitwerk (~> 2.6 )
214214 rainbow (3.1.1 )
215215 rake (13.2.1 )
216- rb_sys (0.9.90 )
216+ rb_sys (0.9.94 )
217217 rdoc (6.6.3.1 )
218218 psych (>= 4.0.0 )
219219 regexp_parser (2.9.0 )
@@ -266,10 +266,10 @@ GEM
266266 standard
267267 stringio (3.1.0 )
268268 thor (1.3.0 )
269- tiktoken_ruby (0.0.7 )
269+ tiktoken_ruby (0.0.8 )
270270 rb_sys (>= 0.9.86 )
271- tiktoken_ruby (0.0.7 -x86_64-darwin )
272- tiktoken_ruby (0.0.7 -x86_64-linux )
271+ tiktoken_ruby (0.0.8 -x86_64-darwin )
272+ tiktoken_ruby (0.0.8 -x86_64-linux )
273273 timeout (0.4.1 )
274274 to_bool (2.0.0 )
275275 tzinfo (2.0.6 )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
3030 spec . executables = spec . files . grep ( %r{\A exe/} ) { |f | File . basename ( f ) }
3131 spec . require_paths = [ "lib" ]
3232
33- spec . add_dependency "langchainrb" , ">= 0.7" , "< 0.11 "
33+ spec . add_dependency "langchainrb" , ">= 0.7" , "< 0.12 "
3434
3535 spec . add_development_dependency "pry-byebug" , "~> 3.10.0"
3636 spec . add_development_dependency "yard" , "~> 0.9.34"
Original file line number Diff line number Diff line change @@ -15,14 +15,6 @@ class Pgvector < Base
1515 # pgvector = Langchain::Vectorsearch::Pgvector.new(llm:)
1616 #
1717
18- # The operators supported by the PostgreSQL vector search adapter
19- OPERATORS = [
20- "cosine" ,
21- "euclidean" ,
22- "inner_product"
23- ]
24- DEFAULT_OPERATOR = "cosine"
25-
2618 attr_reader :operator , :llm
2719 attr_accessor :model
2820
@@ -36,7 +28,7 @@ def initialize(llm:)
3628 # These happen in the template files.
3729 # depends_on "neighbor"
3830
39- @operator = DEFAULT_OPERATOR
31+ @operator = OPERATORS [ DEFAULT_OPERATOR ]
4032
4133 super ( llm : llm )
4234 end
You can’t perform that action at this time.
0 commit comments