Skip to content

feat(invoke): add invoke handlers for blocks and task#479

Merged
douglas-reid merged 2 commits into
mainfrom
doug/special-invoke-logic
Jul 25, 2023
Merged

feat(invoke): add invoke handlers for blocks and task#479
douglas-reid merged 2 commits into
mainfrom
doug/special-invoke-logic

Conversation

@douglas-reid
Copy link
Copy Markdown
Contributor

Hot take: Getting raw dicts back from invoke is a usability concern. Since we are pushing AgentService with a builtin prompt(): -> List[Block], we should have an easy way to actually get those blocks directly.

Proposed usage:

answer_blocks = agent.blocks_from_invoke("prompt", prompt="What did I eat for dinner?", context_id="doug-dinner-discussion')

for block in answer_blocks:
   print(block.text)

@douglas-reid douglas-reid requested review from dkolas and eob July 14, 2023 01:32
@douglas-reid douglas-reid force-pushed the doug/special-invoke-logic branch from 69e14f6 to eb1e1e5 Compare July 14, 2023 01:36
eob
eob previously approved these changes Jul 14, 2023
Copy link
Copy Markdown
Contributor

@eob eob left a comment

Choose a reason for hiding this comment

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

The generalized version of this is something I really wish we had... to get some way to re-build the objects on the other side of the HTTP wire.

dkolas
dkolas previously approved these changes Jul 24, 2023
Copy link
Copy Markdown
Contributor

@dkolas dkolas left a comment

Choose a reason for hiding this comment

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

LGTM

@douglas-reid douglas-reid dismissed stale reviews from dkolas and eob via 5851a92 July 24, 2023 18:03
@douglas-reid douglas-reid force-pushed the doug/special-invoke-logic branch from eb1e1e5 to 5851a92 Compare July 24, 2023 18:03
@douglas-reid douglas-reid changed the title rfc(invoke): add special invoke that converts to blocks feat(invoke): add invoke handlers for blocks and task Jul 24, 2023
@douglas-reid douglas-reid marked this pull request as ready for review July 24, 2023 18:04
@douglas-reid
Copy link
Copy Markdown
Contributor Author

@dkolas thanks. updated with tests. ptal.

@douglas-reid douglas-reid added this pull request to the merge queue Jul 25, 2023
Merged via the queue into main with commit 04eccdc Jul 25, 2023
@douglas-reid douglas-reid deleted the doug/special-invoke-logic branch July 25, 2023 18:49
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