-
Notifications
You must be signed in to change notification settings - Fork 66
Refactor: Optimize performance by reducing token usage and speed up model response time. #89
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
Open
luuquangvu
wants to merge
62
commits into
Nativu5:main
Choose a base branch
from
luuquangvu:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+338
−189
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
a3dfe70
Remove the unused auto-refresh functionality and related imports.
luuquangvu 3a692ab
Enhance error handling in client initialization and message sending
luuquangvu d57e367
Refactor link handling to extract file paths and simplify Google sear…
luuquangvu ccd55f9
Fix regex pattern for Google search link matching
luuquangvu 37632b3
Fix regex patterns for Markdown escaping, code fence and Google searc…
luuquangvu b11cfcc
Increase timeout value in configuration files from 60 to 120 seconds …
luuquangvu f0bff2d
Merge branch 'Nativu5:main' into main
luuquangvu 5b4eaca
Merge branch 'Nativu5:main' into main
luuquangvu b36a682
Merge branch 'Nativu5:main' into main
luuquangvu f00ebfc
Fix Image generation
luuquangvu d911c33
Refactor tool handling to support standard and image generation tools…
luuquangvu a8241ad
Fix: use "ascii" decoding for base64-encoded image data consistency
luuquangvu 5d55780
Merge branch 'Nativu5:main' into main
luuquangvu fd2723d
Fix: replace `running` with `_running` for internal client status checks
luuquangvu 8ee6cc0
Refactor: replace direct `_running` access with `running()` method in…
luuquangvu 0be8aef
Merge remote-tracking branch 'upstream/main'
luuquangvu 453700e
Extend models with new fields for annotations, reasoning, audio, log …
luuquangvu 9260f8b
Extend models with new fields (annotations, error), add `normalize_ou…
luuquangvu d6a8e6b
Extend response models to support tool choices, image output, and imp…
luuquangvu 16435a2
Set default `text` value to an empty string for `ResponseOutputConten…
luuquangvu fc99c2d
feat: Add /images endpoint with dedicated router and improved image m…
luuquangvu 2844176
feat: Add token-based verification for image access
luuquangvu 4509c14
Refactor: rename image store directory to `ai_generated_images` for c…
luuquangvu 75e2f61
fix: Update create_response to use FastAPI Request object for base_ur…
luuquangvu bde6d0d
fix: Correct attribute access in request_data handling within `chat.p…
luuquangvu 601451a
fix: Save generated images to persistent storage
luuquangvu 893eb6d
fix: Remove unused `output_image` type from `ResponseOutputContent` a…
luuquangvu 80462b5
fix: Update image URL generation in chat response to use Markdown for…
luuquangvu af91c4f
Merge branch 'Nativu5:main' into main
luuquangvu f088b5f
Merge branch 'Nativu5:main' into main
luuquangvu 8d49a72
fix: Enhance error handling for full-size image saving and add fallba…
luuquangvu d37eae0
fix: Use filename as image ID to ensure consistency in generated imag…
luuquangvu b9f776d
fix: Enhance tempfile saving by adding custom headers, content-type h…
luuquangvu 4b5fe07
feat: Add support for custom Gemini models and model loading strategies
luuquangvu 5cb29e8
feat: Improve Gemini model environment variable parsing and nested fi…
luuquangvu f25f16d
refactor: Consolidate utility functions and clean up unused code
luuquangvu a1bc8e2
fix: Handle None input in `estimate_tokens` and return 0 for empty text
luuquangvu a7e15d9
refactor: Simplify model configuration and add JSON parsing validators
luuquangvu 61c5f3b
refactor: Simplify Gemini model environment variable parsing with JSO…
luuquangvu efd056c
fix: Enhance Gemini model environment variable parsing with fallback …
luuquangvu 476b9dd
fix: Improve regex patterns in helper module
luuquangvu 35c1e99
docs: Update README files to include custom model configuration and e…
luuquangvu 9b81621
fix: Remove unused headers from HTTP client in helper module
luuquangvu 32a48dc
fix: Update README and README.zh to clarify model configuration via e…
luuquangvu 0c00b08
Update README and README.zh to clarify model configuration via JSON s…
luuquangvu e2233f4
Merge branch 'Nativu5:main' into main
luuquangvu b599d99
Refactor: compress JSON content to save tokens and streamline sending…
luuquangvu 186b844
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu 6dd1fec
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu 20ed245
Refactor: Update all functions to use orjson for better performance
luuquangvu f67fe63
Update project dependencies
luuquangvu 889f2d2
Fix IDE warnings
luuquangvu 66b6202
Incorrect IDE warnings
luuquangvu 3297f53
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu 5399b26
Refactor: Centralized the mapping of the 'developer' role to 'system'…
luuquangvu de01c78
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu 1964147
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu 8c5c749
Refactor: Modify the LMDB store to fix issues where no conversation i…
luuquangvu ce67d66
Refactor: Avoid reusing an existing chat session if its idle time exc…
luuquangvu 3d32d12
Refactor: Update the LMDB store to resolve issues preventing conversa…
luuquangvu 2eb9f05
Refactor: Update the _prepare_messages_for_model helper to omit the s…
luuquangvu ade61d6
Refactor: Modify the logic to convert a large prompt into a temporary…
luuquangvu 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
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.
Uh oh!
There was an error while loading. Please reload this page.