Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry embeddings fetch #245

Merged
merged 4 commits into from
Nov 5, 2024
Merged

retry embeddings fetch #245

merged 4 commits into from
Nov 5, 2024

Conversation

adilhafeez
Copy link
Contributor

@adilhafeez adilhafeez commented Nov 4, 2024

Updated arch gateway code to not panic if embedding server is not up yet. Rather it will keep on trying.

This code change fixes #247 and #243

@adilhafeez adilhafeez marked this pull request as draft November 4, 2024 21:29
@adilhafeez adilhafeez marked this pull request as ready for review November 4, 2024 23:45
@@ -332,7 +333,7 @@ llm_providers:

overrides:
# confidence threshold for prompt target intent matching
prompt_target_intent_matching_threshold: 0.6
prompt_target_intent_matching_threshold: 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for testing, I changed nan -> 0.0 when embeddings is not found. So had to lower the threshold so we go to weather endpoint

@@ -234,7 +245,7 @@ impl StreamContext {
"description embeddings not found for prompt target name: {}",
prompt_name
);
return (prompt_name.clone(), f64::NAN);
return (prompt_name.clone(), 0.0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why return 0.0 instead of nan?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 tells there is no similarity, this only happens when embeddings are not found

@adilhafeez adilhafeez merged commit 9a6ae2e into main Nov 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arch gateway panics if embedding server is not up
3 participants