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=""):
|
def classify_company(row, wikipedia_url=""):
|
||||||
user_prompt = {
|
user_prompt = {
|
||||||
"role": "user",
|
"role": "user",
|
||||||
"content": f"{row[0]};{row[1]};{row[2]};{row[4]};{row[5]}
|
"content": (
|
||||||
Wikipedia-Link: {wikipedia_url}"
|
f"{row[0]};{row[1]};{row[2]};{row[4]};{row[5]}
|
||||||
|
"
|
||||||
|
f"Wikipedia-Link: {wikipedia_url}"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
response = openai.chat.completions.create(
|
response = openai.chat.completions.create(
|
||||||
model="gpt-3.5-turbo",
|
model="gpt-3.5-turbo",
|
||||||
|
|||||||
Reference in New Issue
Block a user