Basshole commited on
Commit
8043d15
·
verified ·
1 Parent(s): 9eab909

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -157,7 +157,10 @@ def call_claude_api(prompt: str) -> str:
157
  max_tokens=1024,
158
  temperature=0.7,
159
  )
160
- return response.content.strip()
 
 
 
161
  except Exception as e:
162
  return f"[Claude API 呼叫失敗]: {str(e)}"
163
 
 
157
  max_tokens=1024,
158
  temperature=0.7,
159
  )
160
+ text = response.content
161
+ if isinstance(text, list):
162
+ text = ' '.join(str(item) for item in text)
163
+ return text.strip()
164
  except Exception as e:
165
  return f"[Claude API 呼叫失敗]: {str(e)}"
166