support for serverless accounts, local vLLM execution, logging of full-text requests#63
Open
alekseys wants to merge 1 commit into
Open
support for serverless accounts, local vLLM execution, logging of full-text requests#63alekseys wants to merge 1 commit into
alekseys wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the retrieval/ingestion utilities to better support additional deployment modes (serverless Cosmos accounts and local OpenAI-compatible LLM endpoints) and to reduce noisy user-facing output in fulltext search failure cases.
Changes:
- Add a serverless fallback when Cosmos container creation fails due to unsupported throughput settings.
- Add support for local OpenAI-compatible endpoints (e.g., vLLM) by switching to
AsyncOpenAIwhen the configured endpoint is localhost. - Replace a
print(...)on fulltext query failure withlogger.debug(...)to keep CLI output cleaner.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| utils/fulltext.py | Replaces user-facing print on query failure with debug logging. |
| dynamic_retriever.py | Adds AsyncOpenAI for localhost endpoints, aiming to enable local/vLLM execution. |
| cosmos_db_upload.py | Adds retry logic for serverless Cosmos accounts by removing throughput options on retry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+468
to
+472
| def llm_client(self): | ||
| if not self._llm_client: | ||
| client_kwargs = { | ||
| "api_version": self._cfg["api_version"], | ||
| "azure_endpoint": self._cfg["llm_endpoint"], | ||
| endpoint = self._cfg["llm_endpoint"] | ||
| if endpoint.startswith("http://localhost") or endpoint.startswith("http://127.0.0.1"): | ||
| self._llm_client = AsyncOpenAI( |
| except Exception as e: | ||
| print(f" [fulltext_search_single_field] query failed: {e}") | ||
| # Suppress verbose Cosmos diagnostics in user-facing output. | ||
| logger.debug("fulltext_search_single_field failed for field '%s': %s", field, type(e).__name__) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
added support for serverless accounts, local vLLM execution, logging of full-text requests