nat.plugins.langchain.tools.code_generation_tool#

Attributes#

log

Classes#

CodeGenerationTool

Tool for generating code using the configured LLM.

Functions#

code_generation_tool(config, builder)

Module Contents#

log#
class CodeGenerationTool(/, **data: Any)#

Bases: nat.data_models.function.FunctionBaseConfig

Tool for generating code using the configured LLM.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

llm_name: nat.data_models.component_ref.LLMRef#
verbose: bool = False#
programming_language: str = 'Python'#
description: str = 'Useful to generate Python code. For any questions about code generation, you must only use this tool!'#
async code_generation_tool(
config: CodeGenerationTool,
builder: nat.builder.builder.Builder,
)#