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: support vision for openai #137

Merged
merged 12 commits into from
Aug 11, 2024
10 changes: 9 additions & 1 deletion agents/addon/extension/openai_chatgpt_python/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
},
"max_memory_length": {
"type": "int64"
},
"enable_tools": {
"type": "bool"
}
},
"data_in": [
Expand Down Expand Up @@ -78,6 +81,11 @@
{
"name": "flush"
}
],
"image_frame_in": [
{
"name": "image_frame"
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, config: OpenAIChatGPTConfig):
self.session.proxies.update(proxies)
self.client.session = self.session

def get_chat_completions_stream(self, messages):
def get_chat_completions_stream(self, messages, tools = None):
req = {
"model": self.config.model,
"messages": [
Expand All @@ -75,6 +75,7 @@ def get_chat_completions_stream(self, messages):
},
*messages,
],
"tools": tools,
"temperature": self.config.temperature,
"top_p": self.config.top_p,
"presence_penalty": self.config.presence_penalty,
Expand Down
Loading