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

Test proofread action #549

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

keceli
Copy link
Contributor

@keceli keceli commented Nov 12, 2024

This is a work in progress to test a proofread action. Requires OPENAI_API_KEY secret to be in place.

@keceli keceli marked this pull request as draft November 12, 2024 04:37
@felker
Copy link
Member

felker commented Dec 3, 2024

was your script written for an old version of the openai API? The GitHub Action runner is pulling the latest release from today:

Collecting openai
  Downloading openai-1.56.1-py3-none-any.whl.metadata (24 kB)

but errors out:

Run echo "docs/sophia/not_in_nav/queueing-and-running-jobs/job-and-queue-scheduling.md" > changed_files.txt
Traceback (most recent call last):
  File "/home/runner/work/user-guides/user-guides/scripts/proofread.py", line 60, in <module>
    main()
  File "/home/runner/work/user-guides/user-guides/scripts/proofread.py", line 30, in main
    response = openai.chat_completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'chat_completions'. Did you mean: 'ChatCompletion'?

@felker
Copy link
Member

felker commented Dec 3, 2024

oh I see the issue, _ instead of .

scripts/proofread.py Outdated Show resolved Hide resolved
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