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

feat: Capabilities support in GPT4 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
@@ -170,8 +233,9 @@ def prepare_message(self, block: Block) -> Optional[Dict[str, str]]:

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)

)
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.

2 participants