Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6949b50

Browse filesBrowse files
authored
py : add grammar to oai like api (#4294)
1 parent d7b800b commit 6949b50
Copy full SHA for 6949b50

File tree

Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed

‎examples/server/api_like_OAI.py

Copy file name to clipboardExpand all lines: examples/server/api_like_OAI.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def make_postData(body, chat=False, stream=False):
7070
if(is_present(body, "mirostat_tau")): postData["mirostat_tau"] = body["mirostat_tau"]
7171
if(is_present(body, "mirostat_eta")): postData["mirostat_eta"] = body["mirostat_eta"]
7272
if(is_present(body, "seed")): postData["seed"] = body["seed"]
73+
if(is_present(body, "grammar")): postData["grammar"] = body["grammar"]
7374
if(is_present(body, "logit_bias")): postData["logit_bias"] = [[int(token), body["logit_bias"][token]] for token in body["logit_bias"].keys()]
7475
if (args.stop != ""):
7576
postData["stop"] = [args.stop]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.