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

fix: fetch threads and messages without limiting #4304

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Dec 20, 2024

Describe Your Changes

This PR resolved an issue where threads and messages were being truncated due to the default API limit.

CleanShot 2024-12-20 at 11 07 40

Changes made

The code changes in this pull request involve modifying API requests to include a limit=-1 query parameter. This change is applied across multiple methods to ensure that the API returns all available data without limiting the number of results. The specific changes are as follows:

  • In extensions/conversational-extension/src/index.ts:

    • listThreads: Changed the endpoint to ${API_URL}/v1/threads?limit=-1.
    • listMessages: Changed the endpoint to ${API_URL}/v1/threads/${threadId}/messages?order=asc&limit=-1.
    • getThreadAssistant: Changed the endpoint to ${API_URL}/v1/assistants/${threadId}?limit=-1.
  • In extensions/model-extension/src/cortex.ts:

    • getModels: Changed the endpoint to ${API_URL}/v1/models?limit=-1.

These changes ensure that the API requests fetch all threads, messages, assistants, and models without any limits.

@louis-jan louis-jan changed the base branch from dev to main December 20, 2024 04:10
@louis-jan louis-jan changed the title Fix/fetch threads and messages without limiting fix: fetch threads and messages without limiting Dec 20, 2024
@github-actions github-actions bot added the type: bug Something isn't working label Dec 20, 2024
@louis-jan louis-jan requested a review from urmauur December 20, 2024 04:11
Copy link
Contributor

github-actions bot commented Dec 20, 2024

Barecheck - Code coverage report

Total: 68.7%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web/hooks/useCreateNewThread.ts44, 46, 51-52, 55-56, 164-165, 167-168, 175-176, 187, 196, 231, 235, 237

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-jan louis-jan merged commit 4e43f97 into main Dec 20, 2024
9 checks passed
@louis-jan louis-jan deleted the fix/fetch-threads-and-messages-without-limiting branch December 20, 2024 10:55
@github-actions github-actions bot added this to the v0.5.12 milestone Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants