Skip to content

Commit 7452ca5

Browse files
committed
refactoring
1 parent 834be6f commit 7452ca5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/src/SearchPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const SearchPage = () => {
170170
)}
171171

172172
{error && (
173-
<Text block style={{ color: 'red', marginBottom: '20px' }}>
173+
<Text block style={{ textAlign: 'center', color: 'red', marginBottom: '20px' }}>
174174
{error}
175175
</Text>
176176
)}
@@ -200,7 +200,7 @@ const SearchPage = () => {
200200
<Card key={index} className={styles.resultCard}>
201201
{result.error ? (
202202
<div className={styles.error}>
203-
{result.error}<br />
203+
{result.error} error<br />
204204
{responseStatus.code} - {responseStatus.description}
205205
</div>
206206
) : (

db/sql/04-rag_procedure.sql renamed to db/sql/04-find_samples.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ declare @retval int, @response nvarchar(max);
55

66
/* Get the embedding for the requested text */
77
declare @qv vector(1536)
8-
exec web.get_embedding @text, @qv output
8+
exec @retval = web.get_embedding @text, @qv output
9+
if (@retval != 0) return;
910

1011
/* Check in the semantic cache to see if a similar question has been already answered */
1112
delete from [dbo].[semantic_cache] where query_date < dateadd(hour, -1, sysdatetime())

0 commit comments

Comments
 (0)