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

allow model selection #65

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Changes from all commits
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
allow model selection
  • Loading branch information
rgbkrk committed Mar 19, 2023
commit cdeff34a040e0280a9df2b443e0d485fd1568ce0
7 changes: 6 additions & 1 deletion genai/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
action="store_true",
help="Replace the current cell with the generated code",
)
@argument(
"--model",
default="gpt-3.5-turbo-0301",
help="the model to use",
)
@cell_magic
def assist(line, cell):
"""Generate code cells for notebooks using OpenAI's API.
Expand Down Expand Up @@ -76,7 +81,7 @@ def assist(line, cell):
ip = get_ipython()
cell_text = cell.strip()

model = "gpt-3.5-turbo-0301"
model = args.model

messages = []
if not args.fresh:
Expand Down