Skip to content

Commit

Permalink
add user argument to all set_api_key() ..
Browse files Browse the repository at this point in the history
functions; increment patch version
  • Loading branch information
slobentanzer committed Jul 7, 2023
1 parent d2b3d62 commit 1b246da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions biochatter/llm_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def set_user_name(self, user_name: str):
self.user_name = user_name

@abstractmethod
def set_api_key(self, api_key: str):
def set_api_key(self, api_key: str, user: Optional[str] = None):
pass

def get_prompts(self):
Expand Down Expand Up @@ -492,7 +492,7 @@ def __init__(
self.base = base
self.deployment_name = deployment_name

def set_api_key(self, api_key: str):
def set_api_key(self, api_key: str, user: Optional[str] = None):
"""
Set the API key for the Azure API. If the key is valid, initialise the
conversational agent. No user stats on Azure.
Expand Down Expand Up @@ -549,7 +549,7 @@ def __init__(

self.messages = []

def set_api_key(self, api_key: str, user: str):
def set_api_key(self, api_key: str, user: Optional[str] = None):
self.chat = HuggingFaceHub(
repo_id=self.model_name,
model_kwargs={"temperature": 1.0}, # "regular sampling"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "biochatter"
version = "0.1.4"
version = "0.1.5"
description = "Backend library for conversational AI in biomedicine"
authors = ["Sebastian Lobentanzer <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 1b246da

Please sign in to comment.