Skip to content

Conversation

@GitOnUp
Copy link
Contributor

@GitOnUp GitOnUp commented Oct 24, 2023

Modify gpt4 plugin to support reading capabilities.

Notable mentions:

  • This needs to be melded with streaming changes
  • Integration / unit tests are in progress but tests here show backwards compatibility

This is the first plugin to really use the metadata on capabilities, so as a bit of a tour guide:

  • There's a bidrectional translation between the FunctionCallingSupport block types that is happening here. This is meant to keep history generic, so that we're not pinned to OpenAI formats.
  • The presence of a plugin capabilities request is an indicator of whether we should be using new behavior or old, and whether we should return a plugin capabilities response.

@@ -1,3 +1,3 @@
steamship==2.17.22
steamship @ git+https://github.com/steamship-core/python-client@george/agents-refactor
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to be swapped for published version

@GitOnUp GitOnUp requested a review from dkolas October 25, 2023 16:16
@GitOnUp GitOnUp marked this pull request as ready for review October 25, 2023 16:16
return {"role": role, "content": block.text}

def prepare_messages(self, blocks: List[Block]) -> List[Dict[str, str]]:
def prepare_messages(self, blocks: List[Block], ) -> List[Dict[str, str]]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: Yank this dangling comma (weird that black didn't do it)

Copy link
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.

Looks good to me! (pending merge with main of course)

messages=messages, user=user_id, options=request.data.options, requested_capabilities=requested_capabilities
)
if capability_response:
# TODO append to file?
Copy link
Contributor

Choose a reason for hiding this comment

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

The plugin itself doesn't have to write anything to Files. Where the blocks are saved is mediated by the engine.

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