jackMort / jackMort/ChatGPT.nvim

API Logging

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

Description

Today I came across an issue where the amount of tokens in my prompt for a regular `:ChatGPT` command was out of sync with what I actually typed. For example (copied from the `:ChatGPT` panel main window):

```
What is 2 + 2?
This model's maximum context length is 16385 tokens. However, you requested 16808 tokens (15808 in the messages, 1000 in the completion). Please reduce the length of the messages or completion.
```

I have two theories on what might be happening:

1. Maybe it's sending the entire panel history as part of the payload
2. I just installed Copilot and I'm wondering if the copilot suggestions are being included somehow even though they do not appear in the main window of the `:ChatGPT` panel after I press enter

**Is there a way I can easily look at the exact API request and response info in order to debug?**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the `:ChatGPT` panel's request path and trace how the prompt is sent and the response is displayed. Determine where request and response details could be exposed for debugging; done means users can inspect the exact API request and response associated with a command.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
api, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.