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

Chore: Add ability to save state message from each gptscript call #105

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

StrongMonkey
Copy link
Contributor

@StrongMonkey StrongMonkey commented Mar 1, 2024

Save each gptscript api calls into Tmpdir with certain filename format.

This is used by @sanjay920 to analyze and train local LLM to be able to do function calling like gpt4 does.

Saving into tmpdir makes sure we don't pollute the user OS with too much files.

Developer is expected to upload these file to s3 in a timely fashion. Use gptscript ./script/upload-s3.gpt to upload to s3.

@@ -115,6 +119,9 @@ func (r *Runner) call(callCtx engine.Context, monitor Monitor, env []string, inp
Type: EventTypeCallFinish,
Content: *result.Result,
})
if err := recordStateMessage(result.State); err != nil {
Copy link
Member

@njhale njhale Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should a failure to write this debug info cause this method to error out? not sure if a warning log would be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. let's make sure this not fail and log a warning.

Signed-off-by: Daishan Peng <daishan@acorn.io>
@StrongMonkey StrongMonkey merged commit 35c5988 into gptscript-ai:main Mar 4, 2024
1 check passed
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.

3 participants