tool

chatbot tool.

Classes

ChatTool

text chat tool.

class ChatTool(llm, overwrite=False, verbose=True)[source]

Bases: TextTool

text chat tool.

Parameters:
  • llm (BaseChatModel) – The large language model to discuss with.

  • overwrite (Optional[bool]) – Whether to overwrite existing files, otherwise raise an error.

  • verbose (Union[bool, int, None]) – Whether to execute the computation verbosely.

chat(prompt='', save_path='')[source]

Chat with a llm from a starting prompt, while saving the conversation.

Parameters:
  • prompt (Union[str, Path, None]) – Prompt to start the conversation with.

  • save_path (Union[str, Path, None]) – Path to the .txt save file.