Chainlit / cookbook

Chainlit's cookbook repo
https://github.com/Chainlit/chainlit
661 stars 245 forks source link

Updates app.py in anthropic-chat #132

Open Krishna2709 opened 1 week ago

Krishna2709 commented 1 week ago

The app.py in anthropic-chat uses the legacy Text Completions API, which results in errors. The Anthropic Documentation mentions using the Messages API (https://github.com/anthropics/anthropic-sdk-python/blob/main/src/anthropic/resources/completions.py#L61). I've updated the file to use Messages API and the token handling.