llmsmith.agent.tool package

Submodules

llmsmith.agent.tool.cohere module

class llmsmith.agent.tool.cohere.CohereTool(declaration: Tool, callable: Callable)

Bases: object

Wrapper for both function declaration and the actual callable to be used in Cohere chat APIs.

Parameters:
  • declaration (cohere.types.tool.Tool) – Function declaration to be passed into Cohere client.

  • callable (typing.Callable) – Actual function (callable)

llmsmith.agent.tool.gemini module

class llmsmith.agent.tool.gemini.GeminiTool(declaration: FunctionDeclaration, callable: Callable)

Bases: object

Wrapper for both function declaration and the actual callable to be used in Gemini LLMs.

Parameters:
  • declaration (google.ai.generativelanguage_v1beta.types.FunctionDeclaration) – Function declaration to be passed into Gemini client.

  • callable (typing.Callable) – Actual function (callable)

llmsmith.agent.tool.groq module

class llmsmith.agent.tool.groq.GroqTool(declaration: Tool, callable: Callable)

Bases: object

Wrapper for both function declaration and the actual callable to be used in chat completion APIs.

Parameters:
  • declaration (groq.types.chat.completion_create_params.Tool) – Function declaration to be passed into Groq client.

  • callable (typing.Callable) – Actual function (callable)

llmsmith.agent.tool.openai module

class llmsmith.agent.tool.openai.OpenAIAssistantTool(declaration: CodeInterpreterToolParam | FileSearchToolParam | FunctionToolParam, callable: Callable)

Bases: object

Wrapper for both tool declaration and the actual callable (required for function tools) to be used in assistant APIs.

Parameters:
  • declaration (openai.types.shared_params.FunctionDefinition) – Function declaration to be passed into OpenAI client.

  • callable (typing.Callable, optional) – Actual function (callable) if tool is of function type

class llmsmith.agent.tool.openai.OpenAIChatTool(declaration: FunctionDefinition, callable: Callable)

Bases: object

Wrapper for both function declaration and the actual callable to be used in chat completion APIs.

Parameters:
  • declaration (openai.types.shared_params.FunctionDefinition) – Function declaration to be passed into OpenAI client.

  • callable (typing.Callable) – Actual function (callable)

Module contents