Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: Add 'explain prompt' functionality to AI tools #159

Closed
wants to merge 3 commits into from

Conversation

jaresty
Copy link
Collaborator

@jaresty jaresty commented Aug 15, 2024

  • Introduced new prompt 'explain prompt' to analyze and explain how a given prompt was understood to generate a response.
  • Replaced thread_to_string with chats_to_string to improve clarity in handling chat threads.
  • Added commands gptRequest and gptExchange to support retrieval of previous requests and exchanges.
  • Updated send_request to store the last request and response in GPTState for better context management.
  • Removed redundant GPTState.last_response assignment in gpt_query.

These changes enhance the ability to run 'explain prompt' and understand prompt-response mechanics.

jaresty and others added 2 commits August 14, 2024 18:01
- Introduced new prompt 'explain prompt' to analyze and explain how a given prompt was understood to generate a response.
- Replaced `thread_to_string` with `chats_to_string` to improve clarity in handling chat threads.
- Added commands `gptRequest` and `gptExchange` to support retrieval of previous requests and exchanges.
- Updated `send_request` to store the last request and response in `GPTState` for better context management.
- Removed redundant `GPTState.last_response` assignment in `gpt_query`.

These changes enhance the ability to run 'explain prompt' and understand prompt-response mechanics.
@jaresty
Copy link
Collaborator Author

jaresty commented Aug 15, 2024

You can explain your last exchange with 'model explain prompt exchange'

@jaresty
Copy link
Collaborator Author

jaresty commented Aug 15, 2024

For what it's worth, the idea for this came from page four of this draft book from Michael Feathers (the author of Working Effectively With Legacy Code) https://www.linkedin.com/posts/michaelfeathers_use-waywords-ugcPost-7227367323878187008-RNZL?utm_source=share&utm_medium=member_desktop

@C-Loftus
Copy link
Owner

Sorry but I don't think I am going to merge this. I think it is a bit too specific. If the user wants to do this, I think it is better for them to just copy the info from the debug output and run a model command on it. I don't really like merging destinations that require storing / modifying additional state unless there is strong need for it.

We can reopen if there is need down the line.

@C-Loftus C-Loftus closed this Aug 15, 2024
@jaresty
Copy link
Collaborator Author

jaresty commented Aug 15, 2024

Can we discuss? I think there is value here beyond simply this use case. This is helpful for a variety of reasons and it's not so easy to do manually. Missing this tempts me to run off of a fork, since I can't implement it myself otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants