ADK for TypeScript: API Reference
    Preparing search index...

    Function setIdProvider

    • Sets the function used to generate event, invocation, session and function-call IDs. Without a provider, every ID keeps its default format.

      Useful when random IDs are not unique, e.g. runtimes restored from one memory snapshot share RNG state. Like adk-python's set_id_provider, but global instead of scoped to an async context.

      Each value must be a non-empty string that no other runtime produces. Session IDs come from it too, so the values should also be hard to guess.

      Parameters

      • provider: IdProvider

        A function that returns a unique ID string.

      Returns void