From d50aa33b1daada59a20241874b6214ea6581667a Mon Sep 17 00:00:00 2001
From: "@nheuser" <nheuser@uni-koblenz.de>
Date: Mon, 18 Dec 2023 11:30:12 +0100
Subject: [PATCH] grammarParser.py string to rule parser function definition

---
 grammarParser.py | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/grammarParser.py b/grammarParser.py
index 8939bdc..3ad4630 100644
--- a/grammarParser.py
+++ b/grammarParser.py
@@ -1,14 +1,4 @@
-import openai
-
-client = openai.OpenAI()
-
-completion = client.chat.completions.create(
-  model="gpt-3.5-turbo",
-  messages=[
-    {"role": "system", "content": "You are a helpful assistant."},
-    {"role": "user", "content": "Hello!"}
-  ]
-)
-
-print(completion.choices[0].message.content)
-
+def stringToRule(t: str, nt: str, r: str, cf=False):
+  """Regeln stehen in der Antwort von ChatGPT in der Form 'alpha->beta', wobei alpha genau ein
+  Nicht-Terminal ist und beta für cf=False aus beliebig vielen Terminalen gefolgt von keinem
+  oder genau einem Nicht-Terminal und für cf=True aus einer beliebigen Kombination aus """
-- 
GitLab