Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Jan 21, 2024
1 parent b717820 commit 21337e4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions phi/assistant/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class Assistant(BaseModel):
# If use_tools is True and update_knowledge_base is True,
# then a tool is added that allows the LLM to update the knowledge base.
update_knowledge_base: bool = False
# If use_tools is True and get_tool_calls is True,
# If use_tools is True and read_tool_call_history is True,
# then a tool is added that allows the LLM to get the tool call history.
get_tool_calls: bool = False
read_tool_call_history: bool = False

#
# -*- Prompt Settings
Expand Down Expand Up @@ -201,7 +201,7 @@ def llm_task(self) -> LLMTask:
tools=self.tools,
tool_choice=self.tool_choice,
update_knowledge_base=self.update_knowledge_base,
get_tool_calls=self.get_tool_calls,
read_tool_call_history=self.read_tool_call_history,
system_prompt=self.system_prompt,
system_prompt_function=self.system_prompt_function,
build_default_system_prompt=self.build_default_system_prompt,
Expand Down
2 changes: 1 addition & 1 deletion phi/assistant/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DuckDbAssistant(CustomAssistant):
num_history_messages: int = 6

followups: bool = False
get_tool_calls: bool = True
read_tool_call_history: bool = True

db_path: Optional[str] = None
connection: Optional[duckdb.DuckDBPyConnection] = None
Expand Down
2 changes: 1 addition & 1 deletion phi/assistant/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PythonAssistant(CustomAssistant):

charting_libraries: Optional[List[str]] = ["plotly", "matplotlib", "seaborn"]
followups: bool = False
get_tool_calls: bool = True
read_tool_call_history: bool = True

base_dir: Optional[Path] = None
save_and_run: bool = True
Expand Down
2 changes: 1 addition & 1 deletion phi/cli/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def set(
set_workspace_as_active(ws_dir_name=ws_name)


@phi_cli.command(short_help="Chat with Phi AI", options_metavar="")
@phi_cli.command(short_help="Chat with Phi AI", options_metavar="", hidden=True)
def ai(
start_new_conversation: bool = typer.Option(
False,
Expand Down
6 changes: 3 additions & 3 deletions phi/task/llm/llm_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class LLMTask(Task):
# If use_tools is True and update_knowledge_base is True,
# then a tool is added that allows the LLM to update the knowledge base.
update_knowledge_base: bool = False
# If use_tools is True and get_tool_calls is True,
# If use_tools is True and read_tool_call_history is True,
# then a tool is added that allows the LLM to get the tool call history.
get_tool_calls: bool = False
read_tool_call_history: bool = False

#
# -*- Prompt Settings
Expand Down Expand Up @@ -150,7 +150,7 @@ def add_tools_to_llm(self) -> None:
self.llm.add_tool(self.search_knowledge_base)
if self.update_knowledge_base:
self.llm.add_tool(self.add_to_knowledge_base)
if self.get_tool_calls:
if self.read_tool_call_history:
self.llm.add_tool(self.get_tool_call_history)

# Set show_tool_calls if it is not set on the llm
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "phidata"
version = "2.3.2"
version = "2.3.3"
description = "Build AI Assistants using language models"
requires-python = ">=3.7"
readme = "README.md"
Expand Down

0 comments on commit 21337e4

Please sign in to comment.