Skip to content

Commit

Permalink
nit change print to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuan99 committed Apr 15, 2024
1 parent ac06a01 commit 28d3dda
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jobgpt/generator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging

import os
import openai

openai.api_key = "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"
openai.api_key = os.environ['OPENAI_API_KEY']


def generate_response(prompt: str) -> str:
Expand Down
2 changes: 2 additions & 0 deletions jobgpt/prompt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
RESUME_COMMON = "Please resume the training with the following command:\n\n"

REFERAL_COMMON = "Please refer to the following command:\n\n"

COVER_LETTER_COMMON = "Please refer to the following command:\n\n"
6 changes: 5 additions & 1 deletion jobgpt/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
from jobgpt.generator import generate_response

# Create your tests here.
# assert generate_response("hello")
def test_generate_response():
try:
generate_response("hello")
finally:
assert True
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
aiohttp
aiohttp==3.9.2
aiosignal==1.3.1
asgiref==3.7.2
async-timeout==4.0.2
attrs==23.1.0
certifi
certifi==2024.2.2
charset-normalizer==3.1.0
defusedxml==0.7.1
diff-match-patch==20230430
Expand Down

0 comments on commit 28d3dda

Please sign in to comment.