Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: MaxContextTokens can be set to Infinity to avoid truncation #508

Conversation

rhennigan
Copy link
Member

This is useful if you'd rather get a Failure[...] instead of sending chat with less content than you expected:

NotebookEvaluate[
    CreateChatNotebook[
        { Cell[ ResourceData[ "Alice in Wonderland" ], "Text" ], Cell[ "What's that?", "ChatInput" ] },
        "MaxContextTokens" -> Infinity
    ],
    InsertResults -> True
]
image

… and return a failure if the messages exceeed the model's token limits
@rhennigan rhennigan merged commit 7757dfc into main Jan 2, 2024
1 check passed
@rhennigan rhennigan deleted the feature/set-max-tokens-to-infinity-to-get-a-failure-for-token-limits branch January 2, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant