diff --git a/brancheneinstufung.py b/brancheneinstufung.py index 5b2d89e1..9baff0ac 100644 --- a/brancheneinstufung.py +++ b/brancheneinstufung.py @@ -135,7 +135,8 @@ def classify_company(row): messages=[system_prompt, user_prompt], temperature=0 ) - parts = [v.strip().strip('"') for v in response.choices[0].message.content.strip().split(";", 7)] + text = response.choices[0].message.content.strip() + parts = [v.strip().strip('"') for v in text.split(";")] while len(parts) < 8: parts.append("k.A.") return parts