Skip to content

Commit 867b353

Browse files
committed
Update parameter type
1 parent 9d8a70b commit 867b353

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/txtai/Embeddings.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Embeddings {
2626
public interface Remote {
2727
@GET("search")
2828
Call<List<SearchResult>> search(@Query("query") String query, @Query("limit") int limit,
29-
@Query("weights") float weights, @Query("index") String index);
29+
@Query("weights") Float weights, @Query("index") String index);
3030

3131
@POST("batchsearch")
3232
Call<List<List<SearchResult>>> batchsearch(@Body HashMap params);
@@ -116,7 +116,7 @@ public Embeddings(String url) {
116116
* @param index index name, if applicable
117117
* @return list of {id: value, score: value}
118118
*/
119-
public List<SearchResult> search(String query, int limit, float weights, String index) throws IOException {
119+
public List<SearchResult> search(String query, int limit, Float weights, String index) throws IOException {
120120
return this.api.search(query, limit, weights, index).execute().body();
121121
}
122122

@@ -131,7 +131,7 @@ public List<SearchResult> search(String query, int limit, float weights, String
131131
* @param index index name, if applicable
132132
* @return list of {id: value, score: value} per query
133133
*/
134-
public List<List<SearchResult>> batchsearch(List<String> queries, int limit, float weights, String index) throws IOException {
134+
public List<List<SearchResult>> batchsearch(List<String> queries, int limit, Float weights, String index) throws IOException {
135135
// Post parameters
136136
HashMap<String, Object> params = new HashMap<String, Object>();
137137
params.put("queries", queries);

0 commit comments

Comments
 (0)