-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update diffs for rohittp0/AutoREPL at Thu Apr 11 19:37:13 UTC 2024
- Loading branch information
github-actions
committed
Apr 11, 2024
1 parent
6dac528
commit 6750f82
Showing
2 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"id": 782648185, | ||
"node_id": "R_kgDOLqZDeQ", | ||
"name": "AutoREPL", | ||
"full_name": "rohittp0/AutoREPL", | ||
"private": false, | ||
"owner": { | ||
"login": "rohittp0", | ||
"id": 45072928, | ||
"node_id": "MDQ6VXNlcjQ1MDcyOTI4", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/45072928?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/rohittp0", | ||
"html_url": "https://github.com/rohittp0", | ||
"followers_url": "https://api.github.com/users/rohittp0/followers", | ||
"following_url": "https://api.github.com/users/rohittp0/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/rohittp0/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/rohittp0/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/rohittp0/subscriptions", | ||
"organizations_url": "https://api.github.com/users/rohittp0/orgs", | ||
"repos_url": "https://api.github.com/users/rohittp0/repos", | ||
"events_url": "https://api.github.com/users/rohittp0/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/rohittp0/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"html_url": "https://github.com/rohittp0/AutoREPL", | ||
"description": "AutoRepl is a tool that can fix your code automatically. Just give it the your code and dependencies list, it will run the code, find errors and fix it.", | ||
"fork": false, | ||
"url": "https://api.github.com/repos/rohittp0/AutoREPL", | ||
"forks_url": "https://api.github.com/repos/rohittp0/AutoREPL/forks", | ||
"keys_url": "https://api.github.com/repos/rohittp0/AutoREPL/keys{/key_id}", | ||
"collaborators_url": "https://api.github.com/repos/rohittp0/AutoREPL/collaborators{/collaborator}", | ||
"teams_url": "https://api.github.com/repos/rohittp0/AutoREPL/teams", | ||
"hooks_url": "https://api.github.com/repos/rohittp0/AutoREPL/hooks", | ||
"issue_events_url": "https://api.github.com/repos/rohittp0/AutoREPL/issues/events{/number}", | ||
"events_url": "https://api.github.com/repos/rohittp0/AutoREPL/events", | ||
"assignees_url": "https://api.github.com/repos/rohittp0/AutoREPL/assignees{/user}", | ||
"branches_url": "https://api.github.com/repos/rohittp0/AutoREPL/branches{/branch}", | ||
"tags_url": "https://api.github.com/repos/rohittp0/AutoREPL/tags", | ||
"blobs_url": "https://api.github.com/repos/rohittp0/AutoREPL/git/blobs{/sha}", | ||
"git_tags_url": "https://api.github.com/repos/rohittp0/AutoREPL/git/tags{/sha}", | ||
"git_refs_url": "https://api.github.com/repos/rohittp0/AutoREPL/git/refs{/sha}", | ||
"trees_url": "https://api.github.com/repos/rohittp0/AutoREPL/git/trees{/sha}", | ||
"statuses_url": "https://api.github.com/repos/rohittp0/AutoREPL/statuses/{sha}", | ||
"languages_url": "https://api.github.com/repos/rohittp0/AutoREPL/languages", | ||
"stargazers_url": "https://api.github.com/repos/rohittp0/AutoREPL/stargazers", | ||
"contributors_url": "https://api.github.com/repos/rohittp0/AutoREPL/contributors", | ||
"subscribers_url": "https://api.github.com/repos/rohittp0/AutoREPL/subscribers", | ||
"subscription_url": "https://api.github.com/repos/rohittp0/AutoREPL/subscription", | ||
"commits_url": "https://api.github.com/repos/rohittp0/AutoREPL/commits{/sha}", | ||
"git_commits_url": "https://api.github.com/repos/rohittp0/AutoREPL/git/commits{/sha}", | ||
"comments_url": "https://api.github.com/repos/rohittp0/AutoREPL/comments{/number}", | ||
"issue_comment_url": "https://api.github.com/repos/rohittp0/AutoREPL/issues/comments{/number}", | ||
"contents_url": "https://api.github.com/repos/rohittp0/AutoREPL/contents/{+path}", | ||
"compare_url": "https://api.github.com/repos/rohittp0/AutoREPL/compare/{base}...{head}", | ||
"merges_url": "https://api.github.com/repos/rohittp0/AutoREPL/merges", | ||
"archive_url": "https://api.github.com/repos/rohittp0/AutoREPL/{archive_format}{/ref}", | ||
"downloads_url": "https://api.github.com/repos/rohittp0/AutoREPL/downloads", | ||
"issues_url": "https://api.github.com/repos/rohittp0/AutoREPL/issues{/number}", | ||
"pulls_url": "https://api.github.com/repos/rohittp0/AutoREPL/pulls{/number}", | ||
"milestones_url": "https://api.github.com/repos/rohittp0/AutoREPL/milestones{/number}", | ||
"notifications_url": "https://api.github.com/repos/rohittp0/AutoREPL/notifications{?since,all,participating}", | ||
"labels_url": "https://api.github.com/repos/rohittp0/AutoREPL/labels{/name}", | ||
"releases_url": "https://api.github.com/repos/rohittp0/AutoREPL/releases{/id}", | ||
"deployments_url": "https://api.github.com/repos/rohittp0/AutoREPL/deployments", | ||
"created_at": "2024-04-05T18:13:38Z", | ||
"updated_at": "2024-04-11T13:39:19Z", | ||
"pushed_at": "2024-04-11T12:50:39Z", | ||
"git_url": "git://github.com/rohittp0/AutoREPL.git", | ||
"ssh_url": "git@github.com:rohittp0/AutoREPL.git", | ||
"clone_url": "https://github.com/rohittp0/AutoREPL.git", | ||
"svn_url": "https://github.com/rohittp0/AutoREPL", | ||
"homepage": "", | ||
"size": 31, | ||
"stargazers_count": 0, | ||
"watchers_count": 0, | ||
"language": "Python", | ||
"has_issues": true, | ||
"has_projects": true, | ||
"has_downloads": true, | ||
"has_wiki": true, | ||
"has_pages": false, | ||
"has_discussions": false, | ||
"forks_count": 0, | ||
"mirror_url": null, | ||
"archived": false, | ||
"disabled": false, | ||
"open_issues_count": 0, | ||
"license": { | ||
"key": "gpl-3.0", | ||
"name": "GNU General Public License v3.0", | ||
"spdx_id": "GPL-3.0", | ||
"url": "https://api.github.com/licenses/gpl-3.0", | ||
"node_id": "MDc6TGljZW5zZTk=" | ||
}, | ||
"allow_forking": true, | ||
"is_template": false, | ||
"web_commit_signoff_required": false, | ||
"topics": [ | ||
|
||
], | ||
"visibility": "public", | ||
"forks": 0, | ||
"open_issues": 0, | ||
"watchers": 0, | ||
"default_branch": "main", | ||
"temp_clone_token": null, | ||
"network_count": 0, | ||
"subscribers_count": 1 | ||
} |