Skip to content

enhance: add document summarizer example #107

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

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

g-linville
Copy link
Member

No description provided.

@cjellick
Copy link
Contributor

cjellick commented Mar 1, 2024

Testing this out now

@cjellick
Copy link
Contributor

cjellick commented Mar 1, 2024

hit this:

14:16:00 started  [main]
14:16:00 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | tool call hamlet-summarizer -> {"index":"0"}
14:16:02 started  [hamlet-summarizer(2)] [input={"index":"0"}]
14:16:02 sent     [hamlet-summarizer(2)]
         content  [2] content | Waiting for model response...
         content  [2] content | tool call hamlet-retriever -> {"index": "0"}
         content  [2] content | tool call sys-read-4381effb -> {"filename": "summary.txt"}
14:16:05 started  [hamlet-summarizer(3)->sys.read(3)] [input={"filename": "summary.txt"}]
14:16:05 started  [hamlet-summarizer(4)->hamlet-retriever(4)] [input={"index": "0"}]
14:16:05 sent     [hamlet-summarizer(3)->sys.read(3)]
14:16:05 failed to run tool [hamlet-retriever] cmd [python3 main.py 0]: context canceled
14:16:05 sent     [hamlet-summarizer(4)->hamlet-retriever(4)]
2024/03/01 14:16:05 open summary.txt: no such file or directory

Copy link
Contributor

@cjellick cjellick left a comment

Choose a reason for hiding this comment

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

  • Make it so that we dont have to touch the summary file to start
  • I think tool.gpt should be reserved for ...reusable tools maybe? Your script is so specific that i think it should just be called hamlet-summarizer.gpt
    is around to agree or disagree on this)
  • Id like the readme to give a little more detail on setup. like, you need to install requirements.txt. ...i also think we should start including the the virtualenv step in these instructions

Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville requested a review from cjellick March 2, 2024 03:42
@g-linville
Copy link
Member Author

@cjellick I just pushed a change for all three of those. Creating the summary.txt file in the Python script didn't work, since the summarizer tool will still attempt to read it before it even gets its first piece of the text. So I just have the top-level tool create it before it starts doing anything else.

@cjellick cjellick merged commit 9b50fe1 into gptscript-ai:main Mar 5, 2024
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