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

OpenAI code interpreter (draft) #37

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix function passing
  • Loading branch information
kharvd committed Jun 24, 2023
commit 971decba7e0844f4ef4ff890aa0318a641151f31
5 changes: 1 addition & 4 deletions gptcli/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,14 @@ def complete(
kwargs["top_p"] = args["top_p"]

if enable_code_execution:
functions = FUNCTIONS_SCHEMA
else:
functions = []
kwargs["functions"] = FUNCTIONS_SCHEMA

response_iter = cast(
Any,
openai.ChatCompletion.create(
messages=messages,
stream=stream,
model=args["model"],
functions=functions,
**kwargs,
),
)
Expand Down