Skip to content

Commit

Permalink
AI 관련 메서드 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
MinSang22Kim committed Oct 26, 2024
1 parent 387a334 commit 17bd99a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Binary file modified __pycache__/openai_utils.cpython-312.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
api_key = os.getenv("OPENAI_API_KEY")
client = OpenAI(api_key=api_key)

# 텍스트 오류 수정 메서드
def fix_text(stt_result: str) -> str:
response = client.chat.completions.create(
model="gpt-3.5-turbo",
Expand All @@ -18,6 +19,7 @@ def fix_text(stt_result: str) -> str:
)
return response.choices[0].message.content.strip()

# 텍스트 언어 번역 메서드
def translate_text(text: str, target_lang: str) -> str:
prompt = (
f"다음 텍스트를 {target_lang}로 번역해 주세요:\n"
Expand Down

0 comments on commit 17bd99a

Please sign in to comment.