Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: replicate/replicate-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9f8d753
Choose a base ref
...
head repository: replicate/replicate-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 42ba2f7
Choose a head ref
  • 7 commits
  • 6 files changed
  • 3 contributors

Commits on May 27, 2025

  1. Support getting REPLICATE_API_TOKEN from cog context

    This commit introduces support for the cog context into the Replicate
    SDK. The `current_scope` helper now makes per-prediction context
    available via the `current_scope().context` dict.
    
    A cog model can then provide a REPLICATE_API_TOKEN on a per-prediction
    basis to be used by the model.
    
        def predict(prompt: str) -> str:
            replicate = Replicate()
            output = replicate.run("anthropic/claude-3.5-haiku", {input:
    {"prompt": "prompt"}})
            return output
    aron authored and philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    ab9982f View commit details
    Browse the repository at this point in the history
  2. Document alternative authentication

    aron authored and philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    52c373c View commit details
    Browse the repository at this point in the history
  3. Make scope lookup case insensitive

    aron authored and philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    302f5da View commit details
    Browse the repository at this point in the history
  4. Linting

    aron authored and philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    68551cf View commit details
    Browse the repository at this point in the history
  5. Update replicate/client.py

    Co-authored-by: Philip Potter <philip.g.potter@gmail.com>
    aron and philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    48acf51 View commit details
    Browse the repository at this point in the history
  6. format and lint

    philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    36c95a8 View commit details
    Browse the repository at this point in the history
  7. Release 1.0.7

    philandstuff committed May 27, 2025
    Configuration menu
    Copy the full SHA
    42ba2f7 View commit details
    Browse the repository at this point in the history
Loading