jackMort / jackMort/ChatGPT.nvim

[Feature request]: Add support for image generation/editing models

Open
#386 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

Description

It would be really cool to support image generation and/or image editing models via this plugin.
For example: `dall-e-2` and `dall-e-3` reuse the same OpenAI API key as regular GPT models. ([docs](https://platform.openai.com/docs/guides/images/usage?context=node&lang=curl)).

Currently, when I manually set the `model` setting to `dall-e-3` I get this response:
![image](https://github.com/jackMort/ChatGPT.nvim/assets/22574186/0207d2c0-8d97-4d93-a586-7c46874f95d0)
But I am successfully generating an image if I manually query OpenAI via curl
![image](https://github.com/jackMort/ChatGPT.nvim/assets/22574186/7345a214-08b4-427c-8489-f2847260cde1)

**Proposal**:
- By default the plugin's response to a prompt is to print the `revised_prompt` and the newly saved image path + filename.
- By default the plugin saves all image responses to some location.
- Default value for this download location is set via the config object.
- Optionally this can be toggled off, and user will have to open URLs with `gx` to preview images.
- When using `dall-e-2`/`dall-e-3` the plugin can accept a new setting for the filesystem path where artifacts can be saved.
- This way, you can use separate directories for different "visions" or projects

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start with the existing model setting and the linked OpenAI image API documentation, then trace how requests and responses are handled; done means supporting image generation or editing with configurable artifact storage, optional downloads, and the proposed prompt and path output.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
ai
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.