Skip to content

Commit

Permalink
Update diffs for rohittp0/AutoREPL at Thu Apr 11 17:10:09 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Apr 11, 2024
1 parent cdaf096 commit 2377789
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions diffs/4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/models/gpt.py b/models/gpt.py
index a416678..f2c1fee 100644
--- a/models/gpt.py
+++ b/models/gpt.py
@@ -25,4 +25,4 @@ class GPT(Model):
messages=messages
)

- return response["choices"][0]["message"]["content"]
+ return response.choices[0].message.content
diff --git a/tests/gpt_test.py b/tests/gpt_test.py
new file mode 100644
index 0000000..0111990
--- /dev/null
+++ b/tests/gpt_test.py
@@ -0,0 +1,12 @@
+from models.gpt import GPT
+
+
+def returns_response():
+ gpt = GPT(True)
+ response = gpt.query("Hello, how are you?", "")
+
+ assert response is not None
+
+
+if __name__ == "__main__":
+ returns_response()

0 comments on commit 2377789

Please sign in to comment.