updating more packages (#4502)

* updating more packages

* mypy fixes

---------

Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
This commit is contained in:
rkuo-danswer 2025-04-10 20:53:36 -07:00 committed by GitHub
parent e51e4b33b6
commit bc74bcae3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 17 additions and 8 deletions

View File

@ -50,13 +50,15 @@ def basic_use_tool_response(
final_search_results = []
initial_search_results = []
initial_search_document_ids: set[str] = set()
for yield_item in tool_call_responses:
if yield_item.id == FINAL_CONTEXT_DOCUMENTS_ID:
final_search_results = cast(list[LlmDoc], yield_item.response)
elif yield_item.id == SEARCH_RESPONSE_SUMMARY_ID:
search_response_summary = cast(SearchResponseSummary, yield_item.response)
for section in search_response_summary.top_sections:
if section.center_chunk.document_id not in initial_search_results:
if section.center_chunk.document_id not in initial_search_document_ids:
initial_search_document_ids.add(section.center_chunk.document_id)
initial_search_results.append(section_to_llm_doc(section))
new_tool_call_chunk = AIMessageChunk(content="")

View File

@ -321,7 +321,12 @@ class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
except exceptions.UserAlreadyExists:
user = await self.get_by_email(user_create.email)
# Handle case where user has used product outside of web and is now creating an account through web
if not user.role.is_web_login() and user_create.role.is_web_login():
if (
not user.role.is_web_login()
and isinstance(user_create, UserCreate)
and user_create.role.is_web_login()
):
user_update = UserUpdateWithRole(
password=user_create.password,
is_verified=user_create.is_verified,

View File

@ -5,7 +5,7 @@ cohere==5.6.1
lxml==5.3.0
lxml_html_clean==0.2.2
mypy-extensions==1.0.0
mypy==1.8.0
mypy==1.15.0
pandas-stubs==2.2.3.241009
pandas==2.2.3
posthog==3.7.4
@ -14,7 +14,7 @@ pytest-asyncio==0.22.0
pytest==8.3.5
reorder-python-imports-black==3.14.0
ruff==0.0.286
sentence-transformers==3.4.1
sentence-transformers==4.0.2
trafilatura==1.12.2
types-beautifulsoup4==4.12.0.3
types-html5lib==1.1.11.13

View File

@ -1,4 +1,5 @@
einops==0.8.0
accelerate==1.6.0
einops==0.8.1
cohere==5.6.1
fastapi==0.115.12
google-cloud-aiplatform==1.58.0
@ -6,10 +7,10 @@ numpy==1.26.4
openai==1.66.3
pydantic==2.8.2
retry==0.9.2
safetensors==0.4.2
sentence-transformers==3.4.1
safetensors==0.5.3
sentence-transformers==4.0.2
setfit==1.1.1
torch==2.2.0
torch==2.6.0
transformers==4.49.0
uvicorn==0.21.1
voyageai==0.2.3

View File

@ -33,6 +33,7 @@ def _verify_index_attempt_pagination(
# Verify time ordering within the page (descending order)
for attempt in paginated_result.items:
if last_time_started is not None:
assert attempt.time_started is not None
assert (
attempt.time_started <= last_time_started
), "Index attempts not in descending time order"