-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Added GPT-4 Vision Support & Token Counter #418
Open
duysqubix
wants to merge
12
commits into
TheR1D:main
Choose a base branch
from
duysqubix: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.
Conversation
This file contains 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
…ompt in sgpt/app.py, refactor lists in pyproject.toml" This commit introduces the 'tiktoken' dependency in the pyproject.toml file and adds functionality to calculate the number of tokens for a given prompt in the sgpt/app.py file. This is done by adding a new 'tokenize' option in the main function.
…ate dependencies"
…g tiktoken as a dependency
- Changed the working directory and copy destination to /home/app for better organization and to follow best practices. - Added a step to create a new user 'app' and switch to it for security reasons, as running the Docker container as root can be a security risk. 2. sgpt/__init__.py: - Imported Optional from typing to support optional typing in the code, improving code readability and maintainability. 3. sgpt/app.py: - Imported rich library and typing for better console output formatting and type hinting. - Replaced typer.echo with rich.print for better console output formatting. - Removed a comment that was not providing any additional information. 4. sgpt/config.py: - Imported Console from rich for better console output formatting. - Added a new configuration variable 'FORCE_COLOR' to allow users to force color output in the console. - Added a method to initialize a Console object with the appropriate color system based on the 'FORCE_COLOR' configuration variable. 5. sgpt/role.py: - Imported print from rich for better console output formatting. - Replaced typer.echo with rich.print for better console output formatting. 6. sgpt/utils.py: - Imported print from rich for better console output formatting. - Replaced typer.echo with rich.print for better console output formatting.
Would be great to have vision available. |
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.
Great project, not sure if its dead or not.. but with the new vision preview models. I have modified the original codebase to support vision by supplying a
--image
option. Only works with thegpt-4-vision-preview
model, supports both local images and URLs.Also added an extra dependency that estimates the number of tokens.