-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds initial support for gpt-4-vison (#184)
* feat: adds support for gpt-4-vison * chore: update gitleaksignore * chore: mark gpt-4-vision as beta
- Loading branch information
Showing
16 changed files
with
632 additions
and
83 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f1cf67714d70ef1087887abd008d80cfd2483a9b:pkg/fs/fs_test.go:aws-access-token:92 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# GPT-4 Vision API | ||
|
||
SGPT additionally facilitates the utilization of the GPT-4 Vision API. Include input images using the `-i` or `--input` | ||
flag, supporting both URLs and local images. | ||
|
||
```shell | ||
$ sgpt -m "gpt-4-vision-preview" -i "https://upload.wikimedia.org/wikipedia/en/c/cb/Marvin_%28HHGG%29.jpg" "what can you see on the picture?" | ||
The image shows a figure resembling a robot with a humanoid form. It has a | ||
$ sgpt -m "gpt-4-vision-preview" -i pkg/fs/testdata/marvin.jpg "what can you see on the picture?" | ||
The image shows a figure resembling a robot with a sleek, metallic surface. It | ||
``` | ||
|
||
It is also possible to combine URLs and local images: | ||
|
||
```shell | ||
$ sgpt-m "gpt-4-vision-preview" -i "https://upload.wikimedia.org/wikipedia/en/c/cb/Marvin_%28HHGG%29.jpg" -i pkg/fs/testdata/marvin.jpg "what is the difference between those two pictures" | ||
The two images provided appear to be identical. Both show the same depiction of a | ||
``` | ||
|
||
To avoid specifying the `-m "gpt-4-vision-preview"` for each request, you can streamline the process by creating a bash | ||
alias: | ||
|
||
```shell | ||
alias vision='sgpt -m "gpt-4-vision-preview"' | ||
``` | ||
|
||
For more bash examples, see [.bash_aliases](https://github.com/tbckr/sgpt/blob/main/.bash_aliases). | ||
|
||
**Important:** The GPT-4-vision API integration is currently in beta and may change in the future. |
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
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
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
Oops, something went wrong.