From c859a611e7425323067d76858ed1e0a4ad88cc7f Mon Sep 17 00:00:00 2001 From: "@nheuser" <nheuser@uni-koblenz.de> Date: Thu, 14 Dec 2023 14:01:30 +0100 Subject: [PATCH] updated grammarParser.py and .gitignore --- .gitignore | 1 - grammarParser.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a185c2..6e0412b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -.env envGPT/ \ No newline at end of file diff --git a/grammarParser.py b/grammarParser.py index f0f21c8..8939bdc 100644 --- a/grammarParser.py +++ b/grammarParser.py @@ -1,2 +1,14 @@ 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) + -- GitLab