https://github.com/conjuncts/anthropic_batch

Since Oct 8, 2024: batch is now generally available for the anthropic API. https://www.anthropic.com/news/message-batches-api

https://github.com/conjuncts/anthropic_batch

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Since Oct 8, 2024: batch is now generally available for the anthropic API. https://www.anthropic.com/news/message-batches-api

Basic Info
  • Host: GitHub
  • Owner: conjuncts
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 6.84 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Archived
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Batch Anthropic Compat

Archived due to https://docs.anthropic.com/en/docs/build-with-claude/batch-processing and https://www.anthropic.com/news/message-batches-api.

On Apr 15, 2024, OpenAI released their batch API with a 50% cost reduction. Their batch files are pretty convenient ways to bookkeep large number of requests and completions. This short script seeks to make already-constructed OpenAI-style batch files compatible and ingestible for the Anthropic models.

Note: an additional header line is provided in the jsonl which is not given in the original OpenAI batch API. This is configurable.

Support

Currently, only simple synchronous text is supported NOT supported: - vision - tools - streaming

Alternatives

LiteLLM, etc. But external libraries are not used here to keep dependencies minimal.

Owner

  • Login: conjuncts
  • Kind: user

GitHub Events

Total
  • Push event: 2
Last Year
  • Push event: 2

Dependencies

requirements.txt pypi
  • anthropic *
  • python-dotenv *
  • tqdm *