Fix: SyntaxError im Prompt-Aufbau behoben
- f-String für den User-Prompt korrekt über mehrere Zeilen in Klammern gesetzt - Ermöglicht saubere Übergabe der Wikipedia-URL an GPT
This commit is contained in:
@@ -169,8 +169,11 @@ def get_wikipedia_data(name, website_hint=""):
|
||||
def classify_company(row, wikipedia_url=""):
|
||||
user_prompt = {
|
||||
"role": "user",
|
||||
"content": f"{row[0]};{row[1]};{row[2]};{row[4]};{row[5]}
|
||||
Wikipedia-Link: {wikipedia_url}"
|
||||
"content": (
|
||||
f"{row[0]};{row[1]};{row[2]};{row[4]};{row[5]}
|
||||
"
|
||||
f"Wikipedia-Link: {wikipedia_url}"
|
||||
)
|
||||
}
|
||||
response = openai.chat.completions.create(
|
||||
model="gpt-3.5-turbo",
|
||||
|
||||
Reference in New Issue
Block a user