Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def extract_text_from_pdf(pdf_path):
|
|
42 |
|
43 |
def summarize_text_with_chat(text, max_length=10000):
|
44 |
"""OpenAIのChat APIを使ってテキストを要約。"""
|
45 |
-
openai.api_key = os.getenv('
|
46 |
trimmed_text = text[:max_length]
|
47 |
response = openai.chat.completions.create(
|
48 |
model="gpt-3.5-turbo-0125",
|
|
|
42 |
|
43 |
def summarize_text_with_chat(text, max_length=10000):
|
44 |
"""OpenAIのChat APIを使ってテキストを要約。"""
|
45 |
+
openai.api_key = os.getenv('OPEN_AI_API_KEYS')
|
46 |
trimmed_text = text[:max_length]
|
47 |
response = openai.chat.completions.create(
|
48 |
model="gpt-3.5-turbo-0125",
|