Skip to content

Add max_tokens parameter to all tools #10

@iiivanova

Description

@iiivanova

Summary

All tools currently hardcode max_tokens=1024. For longer analyses the output can get cut off. Add an optional max_tokens parameter to each tool that defaults to 1024 to preserve existing behavior.

Affected functions

  • evaluate()
  • plan()
  • redteam()
  • ask()

Expected usage

# default behavior unchanged
print(evaluate(text))

# override for longer output
print(evaluate(text, max_tokens=2048))

Implementation notes

  • Add max_tokens: int = 1024 to each tool's function signature
  • Pass through to create_message() in providers.py
  • Update tests to cover non-default values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions