Skip to content

Commit

Permalink
feat: add infos for gpt-4o support
Browse files Browse the repository at this point in the history
  • Loading branch information
tbckr committed May 14, 2024
1 parent 00040bd commit cb20c3b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 46 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,35 +207,29 @@ Hello ChatGPT!
If you want to stream the completion to the command line, you can add the `--stream` flag. This will stream the output
to the command line as it is generated.
### GPT-4 Vision API
### GPT-4o and GPT-4 Vision API Support
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.
SGPT additionally facilitates the utilization of the GPT-4o and GPT-4 Vision API. Include input images using the `-i`
or `--input` flag, supporting both URLs and local images.
```shell
$ sgpt -m "gpt-4o" -i pkg/fs/testdata/marvin.jpg "what can you see on the picture?"
The picture shows a robot with a large, round head and an expressive, downward-slanting triangular eye. The body of the robot is designed with a sleek, somewhat shiny, metallic structure and it is pointing with its right hand. The design appears to be humanoid with distinct arms, legs, and a segmented torso.
$ 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
$ sgpt -m "gpt-4o" -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 pictures you provided appear to be identical. There are no visible differences between them. Both show the same character in the same pose with the same lighting and background.
```
To avoid specifying the `-m "gpt-4-vision-preview"` for each request, you can streamline the process by creating a bash
alias:
You can also set the default model to GPT-4o or GPT-4 Vision by setting it in
the [configuration file](https://sgpt.readthedocs.io/en/stable/configuration/).
```shell
alias vision='sgpt -m "gpt-4-vision-preview"'
```
For more bash examples, see [.bashrc](https://github.com/tbckr/sgpt/blob/main/.bashrc).
**Important:** The GPT-4-vision API integration is currently in beta and may change in the future.
**Important:** The GPT-4o and GPT-4-vision API integration is currently in beta and may change in the future.
### Chat Capabilities
Expand Down
23 changes: 23 additions & 0 deletions docs/usage/gpt-4o.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# GPT-4o and GPT-4 Vision API Support

SGPT additionally facilitates the utilization of the GPT-4o and GPT-4 Vision API. Include input images using the `-i`
or `--input` flag, supporting both URLs and local images.

```shell
$ sgpt -m "gpt-4o" -i pkg/fs/testdata/marvin.jpg "what can you see on the picture?"
The picture shows a robot with a large, round head and an expressive, downward-slanting triangular eye. The body of the robot is designed with a sleek, somewhat shiny, metallic structure and it is pointing with its right hand. The design appears to be humanoid with distinct arms, legs, and a segmented torso.
$ 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
```

It is also possible to combine URLs and local images:

```shell
$ sgpt -m "gpt-4o" -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 pictures you provided appear to be identical. There are no visible differences between them. Both show the same character in the same pose with the same lighting and background.
```

You can also set the default model to GPT-4o or GPT-4 Vision by setting it in
the [configuration file](https://sgpt.readthedocs.io/en/stable/configuration/).

**Important:** The GPT-4o and GPT-4-vision API integration is currently in beta and may change in the future.
29 changes: 0 additions & 29 deletions docs/usage/gpt4-vision-api.md

This file was deleted.

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nav:
- Getting Started: 'getting-started.md'
- Usage Guide:
- Query Models: 'usage/query-models.md'
- GPT-4 Vision API: 'usage/gpt4-vision-api.md'
- GPT-4o and GPT4 Vision API: 'usage/gpt-4o.md'
- Chat: 'usage/chat.md'
- Docker: 'usage/docker.md'
- Personas: 'usage/personas.md'
Expand Down

0 comments on commit cb20c3b

Please sign in to comment.