Skip to content

Commit

Permalink
pass through new generate params (#82)
Browse files Browse the repository at this point in the history
* pass through new generate params

* multi turn

* update version
  • Loading branch information
Jacobsolawetz authored Aug 20, 2024
1 parent e5634ff commit 0b92625
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__/
*.py[cod]
*$py.class
.idea
*.ipynb

# C extensions
*.so
Expand Down
2 changes: 1 addition & 1 deletion arcee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.3.6"
__version__ = "1.3.7"

import os

Expand Down
22 changes: 20 additions & 2 deletions arcee/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,26 @@ def deployment_status(deployment_name: str) -> Dict[str, str]:
return make_request("get", Route.deployment + "/status", data)


def generate(deployment_name: str, query: str) -> Dict[str, str]:
data = {"deployment_name": deployment_name, "query": query}
def generate(
deployment_name: str,
query: str | None = None,
messages: List[Dict[str, str]] | None = None,
repetition_penalty: float | None = None,
top_k: int | None = None,
max_new_tokens: int | None = None,
temperature: float | None = None,
top_p: float | None = None,
) -> Dict[str, str]:
data = {
"deployment_name": deployment_name,
"query": query,
"repetition_penalty": repetition_penalty,
"top_k": top_k,
"max_new_tokens": max_new_tokens,
"temperature": temperature,
"messages": messages,
"top_p": top_p,
}
return make_request("post", Route.deployment + "/generate", data)


Expand Down

0 comments on commit 0b92625

Please sign in to comment.