File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- weaviate-ruby (0.7.1 )
4+ weaviate-ruby (0.7.2 )
55 faraday (~> 2.7 )
66 graphlient (~> 0.7.0 )
77
Original file line number Diff line number Diff line change 88
99Ruby wrapper for the Weaviate.io API
1010
11- ![ Tests status] ( https://github.com/andreibondarev/weaviate-ruby/actions/workflows/ci.yml/badge.svg )
11+ ![ Tests status] ( https://github.com/andreibondarev/weaviate-ruby/actions/workflows/ci.yml/badge.svg ) [ ![ Gem Version ] ( https://badge.fury.io/rb/weaviate-ruby.svg )] ( https://badge.fury.io/rb/weaviate-ruby )
1212
1313## Installation
1414
@@ -172,6 +172,7 @@ client.objects.batch_delete(
172172near_text = ' { concepts: ["biology"] }'
173173sort_obj = ' { path: ["category"], order: desc }'
174174where_obj = ' { path: ["id"], operator: Equal, valueString: "..." }'
175+ with_hybrid = ' { query: "Sweets", alpha: 0.5 }'
175176
176177client.query.get(
177178 class_name: ' Question' ,
@@ -187,13 +188,13 @@ client.query.get(
187188 near_text: near_text,
188189
189190 # To use this parameter you must have created your schema by setting the `vectorizer:` property to 'multi2vec-clip' or 'img2vec-neural'
190- # near_image: ... ,
191+ near_image: near_image ,
191192
192- # hybrid: ... ,
193+ with_hybrid: with_hybrid ,
193194
194- # bm25: ... ,
195+ bm25: bm25 ,
195196
196- # near_object: ... ,
197+ near_object: near_object ,
197198
198199 ask: ' { question: "your-question?" }'
199200)
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ def get(
1414 near_vector : nil ,
1515 near_image : nil ,
1616 near_object : nil ,
17+ with_hybrid : nil ,
18+ bm25 : nil ,
1719 ask : nil
1820 )
1921 response = client . graphql . execute (
@@ -26,6 +28,8 @@ def get(
2628 near_vector : near_vector ,
2729 near_image : near_image ,
2830 near_object : near_object ,
31+ with_hybrid : with_hybrid ,
32+ bm25 : bm25 ,
2933 ask : ask
3034 ) ,
3135 after : after ,
@@ -133,6 +137,8 @@ def get_query(
133137 near_vector : nil ,
134138 near_image : nil ,
135139 near_object : nil ,
140+ with_hybrid : nil ,
141+ bm25 : nil ,
136142 ask : nil ,
137143 sort : nil
138144 )
@@ -151,6 +157,8 @@ def get_query(
151157 #{ near_vector . present? ? "nearVector: #{ near_vector } " : "" } ,
152158 #{ near_image . present? ? "nearImage: #{ near_image } " : "" } ,
153159 #{ near_object . present? ? "nearObject: #{ near_object } " : "" } ,
160+ #{ with_hybrid . present? ? "hybrid: #{ with_hybrid } " : "" } ,
161+ #{ bm25 . present? ? "bm25: #{ bm25 } " : "" } ,
154162 #{ ask . present? ? "ask: #{ ask } " : "" } ,
155163 #{ where . present? ? "where: #{ where } " : "" } ,
156164 #{ sort . present? ? "sort: #{ sort } " : "" }
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Weaviate
4- VERSION = "0.7.1 "
4+ VERSION = "0.7.2 "
55end
You can’t perform that action at this time.
0 commit comments