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

Question: How to reset the context of an org-babel chatgpt #96

Open
falematte opened this issue May 25, 2023 · 12 comments
Open

Question: How to reset the context of an org-babel chatgpt #96

falematte opened this issue May 25, 2023 · 12 comments

Comments

@falematte
Copy link

falematte commented May 25, 2023

In the shell I would simply write "clear". More on this, how to have two org-babel blocks share the same context?

@xenodium
Copy link
Owner

ob-chatgpt-shell blocks don't keep context by default, unless :context t is set.

The context is constructed by collecting previous blocks in the same file:

ob

More details at: https://github.com/xenodium/chatgpt-shell#context

@falematte
Copy link
Author

I am not able to reproduce this?
image

@falematte
Copy link
Author

Some other times the :context works fine. What could be the cause of this?

@xenodium
Copy link
Owner

The response in #96 (comment) is aware of the context. The response acknowledged both pieces of context.

@falematte
Copy link
Author

Yea, you are right. My bad.

@xenodium
Copy link
Owner

xenodium commented May 29, 2023

Some other times the :context works fine. What could be the cause of this?

Temperature would control creativity/randomness, but this isn't currently one of the supported header args. Adding :temperature to ob-chatgpt-shell.el would be great. This is already handled in chatgpt-shell.el and the logic can be copied of over. Are you interested in contributing it?

@falematte
Copy link
Author

I am afraid that I am not really capable of doing this. Anyway I believe there is something going on with the context. I often get this error:

org-babel-insert-result: Wrong type argument: markerp, nil

@xenodium
Copy link
Owner

org-babel-insert-result: Wrong type argument: markerp, nil

Please file a separate bug for this, so we can track/solve independently. Use M-x toggle-debug-on-error and post a stack trace, so I can look into it.

@xenodium
Copy link
Owner

Temperature would control creativity/randomness, but this isn't currently one of the supported header args. Adding :temperature to ob-chatgpt-shell.el

@falematte filed #101 for this.

@falematte
Copy link
Author

context: t is now giving error to me!

image

@falematte falematte reopened this Nov 20, 2023
@xenodium
Copy link
Owner

One of the source blocks in context likley hasn't been executed and is missing #+RESULTS:.If you execute it, the error should go away. I'll have to add code to omit empty assistant entries to avoid proactively.

@xenodium
Copy link
Owner

I'll have to add code to omit empty assistant entries to avoid proactively.

1860b3e should do it. Give that a try.

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

No branches or pull requests

2 participants