-
Notifications
You must be signed in to change notification settings - Fork 9
fix: add exponential retry logic to stackit embedder #75
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f35664b
fix: add exponential retry logic to stackit embedder
a-klos 5bd7277
refactor: with black
a-klos a732b90
Merge branch 'deps-main' into fix/stackit-embedder
a-klos d89d3ce
fix: update parameter type annotation for embed_documents method
a-klos 07ac8cb
Update libs/rag-core-api/src/rag_core_api/impl/embeddings/stackit_emb…
a-klos c5ce122
feat: enhance embed_documents with rate limit handling and exponentia…
a-klos 5de11a2
chore: add verbose flag to npm install in Dockerfiles for better logging
a-klos c962367
feat: refactor StackitEmbedder to use retry decorator for improved er…
a-klos c6c5cc5
merge main
a-klos bad2dbc
merge deps-main
a-klos 2786fa0
fix: improve embed_query method to handle empty embeddings list
a-klos 240c1a7
fix: update embed_query method to return original embeddings list whe…
a-klos 5d4d560
fix: clarify comment on max_retries in RetrySettings
a-klos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,6 @@ features: | |
| enabled: true | ||
| frontend: | ||
| enabled: true | ||
| keydb: | ||
| enabled: true | ||
| mcp: | ||
| enabled: true | ||
|
|
||
|
|
@@ -70,15 +68,15 @@ backend: | |
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/mcp-server | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| name: backend | ||
| replicaCount: 1 | ||
|
|
||
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/rag-backend | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| command: | ||
| - "poetry" | ||
|
|
@@ -192,6 +190,9 @@ backend: | |
| stackitEmbedder: | ||
| STACKIT_EMBEDDER_MODEL: "intfloat/e5-mistral-7b-instruct" | ||
| STACKIT_EMBEDDER_BASE_URL: https://api.openai-compat.model-serving.eu01.onstackit.cloud/v1 | ||
| STACKIT_EMBEDDER_MAX_RETRIES: 10 | ||
| STACKIT_EMBEDDER_RETRY_BASE_DELAY: 1.0 | ||
| STACKIT_EMBEDDER_RETRY_MAX_DELAY: 600.0 | ||
| ollama: | ||
| OLLAMA_MODEL: "llama3.2:3b-instruct-fp16" | ||
| OLLAMA_BASE_URL: "http://rag-ollama:11434" | ||
|
|
@@ -216,7 +217,7 @@ frontend: | |
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/frontend | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| service: | ||
| type: ClusterIP | ||
|
|
@@ -251,7 +252,7 @@ adminBackend: | |
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/admin-backend | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| command: | ||
| - "poetry" | ||
|
|
@@ -321,7 +322,9 @@ adminBackend: | |
| CHUNKER_OVERLAP: 300 | ||
| keyValueStore: | ||
| USECASE_KEYVALUE_PORT: 6379 | ||
| USECASE_KEYVALUE_HOST: "rag-keydb" | ||
| USECASE_KEYVALUE_HOST: "rag-redis-primary" | ||
| USECASE_KEYVALUE_USERNAME: "default" | ||
| USECASE_KEYVALUE_PASSWORD: "MOqTsoa22R" | ||
| sourceUploader: | ||
| SOURCE_UPLOADER_TIMEOUT: 3600 | ||
|
|
||
|
|
@@ -331,7 +334,7 @@ extractor: | |
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/document-extractor | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| command: | ||
| - "poetry" | ||
|
|
@@ -379,7 +382,7 @@ adminFrontend: | |
| image: | ||
| repository: ghcr.io/stackitcloud/rag-template/admin-frontend | ||
| pullPolicy: Always | ||
| tag: "latest" | ||
| tag: "v2.1.0" | ||
|
|
||
| service: | ||
| type: ClusterIP | ||
|
|
@@ -526,12 +529,12 @@ langfuse: | |
|
|
||
| # Redis Configuration (external KeyDB) | ||
| redis: | ||
| deploy: false | ||
| host: "rag-keydb" | ||
| deploy: true | ||
| host: "rag-redis-primary" | ||
| port: 6379 | ||
| auth: | ||
| username: "default" | ||
| password: "" | ||
| password: "MOqTsoa22R" | ||
|
Comment on lines
536
to
+537
|
||
|
|
||
| # ClickHouse Configuration (external ClickHouse) | ||
| clickhouse: | ||
|
|
@@ -617,8 +620,3 @@ ollama: | |
| qdrant: | ||
| image: | ||
| tag: v1.14.1 | ||
|
|
||
| keydb: | ||
| multiMaster: "no" | ||
| activeReplicas: "no" | ||
| nodes: 1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,5 @@ class Config: | |
|
|
||
| host: str = Field() | ||
| port: int = Field() | ||
| username: str = Field() | ||
| password: str = Field() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded password in configuration file poses a security risk. Consider using Kubernetes secrets or environment variable references instead of plain text passwords in the values file.