tbckr / sgpt

SGPT is a command-line tool that provides a convenient way to interact with OpenAI models, enabling users to run queries, generate shell commands and produce code directly from the terminal.
MIT License
234 stars 24 forks source link

Interactive chat session #111

Closed tbckr closed 9 months ago

tbckr commented 12 months ago

Introduce an interactive chat session mode via the "-i" flag.

This creates a shell, where one can create an answer directly. The following short commands also exist:

tbckr commented 9 months ago

Interactive session is not a priority know - issue is closed

ilya-bystrov commented 8 months ago

I was also interested in a chat support and crafted a bash one-liner that does the trick.

rlwrap bash -c 'echo ▶; while read in; do [[ -n "$in" ]] && echo ■ && sgpt --chat chat_name "$in" && echo ▶; done'

A little bit more details can be found here.

Drop a comment if you have any questions!

tbckr commented 8 months ago

@ilya-bystrov This is a really cool and elegant solution - thanks for sharing!

Would you mind documenting your solution in sgpt's documentation? I would like to share it within the docs as well.

If you do not have time for this, I can do it in the next couple of weeks.