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

Retrieval Details #15

Merged
merged 2 commits into from
Mar 20, 2024
Merged

Retrieval Details #15

merged 2 commits into from
Mar 20, 2024

Conversation

phact
Copy link
Collaborator

@phact phact commented Mar 20, 2024

This PR adds retrieval details in Run Steps which can be accessed like so:

class EventHandler(AssistantEventHandler):
    @override
    def on_run_step_done(self, run_step) -> None:
            print("retrieval")
            for tool_call in run_step.step_details.tool_calls:
                print(json.dumps(tool_call.retrieval)

with open_ai_client().beta.threads.runs.create_and_stream(
        thread_id=thread.id,
        assistant_id=assistant_id,
        event_handler=EventHandler(),
) as stream:
     stream.until_done()

It also bumps up the file limits (both for creation and for adding to an assistant) to 1000.

@phact
Copy link
Collaborator Author

phact commented Mar 20, 2024

@phact phact merged commit 4a72029 into main Mar 20, 2024
12 checks passed
@phact phact deleted the run-step-retrieval-details branch October 30, 2024 19:57
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.

1 participant