Skip to content

Commit

Permalink
allow passing history to AI
Browse files Browse the repository at this point in the history
  • Loading branch information
piEsposito committed Jun 7, 2024
1 parent 38063f8 commit cd8856c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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 = "tiny-ai-client"
version = "0.0.6"
version = "0.0.7"
description = "Tiny AI client for LLMs. As simple as it gets."
authors = ["piEsposito <[email protected]>"]
license = "Apache 2.0"
Expand Down
8 changes: 5 additions & 3 deletions tiny_ai_client/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ def __init__(
max_new_tokens: int | None = None,
timeout: int = 30,
tools: List[Union[Callable, Dict]] | None = None,
chat: List["Message"] | None = None,
):
# llm sampling parameters
self.temperature: int = temperature
self.max_new_tokens: int | None = max_new_tokens
self.timeout: int = timeout
self.chat: List[Message] = chat or []
if system:
self.chat.append(Message(text=system, role="system"))

tools = tools or []
self.tools = tools
self.tools_dict = {tool.__name__: tool for tool in tools}

self.model_name: str = model_name
self.system: str = system
self.chat: List[Message] = (
[Message(role="system", text=system)] if system else []
)
self.client_wrapper: LLMClientWrapper = self.get_llm_client_wrapper(
model_name=model_name, tools=self.tools
)
Expand Down

0 comments on commit cd8856c

Please sign in to comment.