dsw7 / GPTifier

A beautiful C++ libcurl / ChatGPT interface. I more or less work on this project for fun :)
MIT License
0 stars 1 forks source link

Support short / quiet / reduced output for `vim` / Vimscript integration #72

Closed dsw7 closed 1 month ago

dsw7 commented 1 month ago

Impetus

Right now if I run something like:

gpt run -u -p "What is 2 + 2?"

I get a bunch of output:

---------------------------------------------------------------------------------------------------
Request: {
  "messages": [
...
}
---------------------------------------------------------------------------------------------------
Time (s): 0.500213
---------------------------------------------------------------------------------------------------
Response: {
  "choices": [
...
}
---------------------------------------------------------------------------------------------------
Results: 2 + 2 equals 4.
---------------------------------------------------------------------------------------------------

Which for terminal use is fine. But I want to integrate this project into my vim workflow so it would be nice to have a means to extract only the 2 + 2 equals 4. component.