Skip to content

[DOCS] Provide example on token management to avoid "too many token" exception #215

@rkurduka

Description

@rkurduka

Documentation Section

https://strandsagents.com/latest/documentation/docs/user-guide/concepts/agents/structured-output/

Current State

Currently document does not have any example on how to manage "tokens" and avoid "too many tokens" exception .

Caching or Callback handler talks about it can help to manage input/output tokens , but it doesn't have any example

Suggested Improvement

Currently , document talks about few ways to avoid "too many token" exception in sections like , caching or custom handler , but there is no example provided.
If we can add example ,
how we can manage input or output text not to hit limit that will be helpful .
Scenarios may be we can cover are:

  1. how create chunks of bigger file and how to pass those chunks for processing
  2. And in structure output scenario , if we can add an example , how to manage inputs ( if we are taking it from previous conversions - because it may be too long). That will be helpful too.

Thanks
Rohit Kurdukar

Rationale

Adding example will help lot of us to get started with real world use cases , rather than spending time in troubleshooting common issues like "too many tokens"

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions