Skip to content

Commit 9e0be33

Browse files
authored
Merge pull request #30 from tinybirdco/fix-vs
fix vs
2 parents c239329 + 9e09438 commit 9e0be33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tinybird/endpoints/llm_messages.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ SQL >
6969
AND timestamp < {{DateTime(end_date)}}
7070
{% end %}
7171
{% if defined(embedding) %}
72-
AND cosineDistance(embedding, {{ Array(embedding, 'Float32') }}) > {{ Float64(similarity_threshold, 0.3) }}
72+
AND length(embedding) > 0 and similarity > {{ Float64(similarity_threshold, 0.3) }}
7373
and response_status != 'error'
7474
{% end %}
7575
{% if defined(embedding) %}

0 commit comments

Comments
 (0)