Skip to content

Conversation

@dgellow
Copy link
Collaborator

@dgellow dgellow commented Jul 3, 2025

Part of #32

This pull requests adds the helper method replicate.use(), as defined here.

See the script examples/use_demo.py.

Some things that are still a work in progress:

  • type checking is currently broken in a lots of places. The stainless sdk targets python 3.8, while the current replicate sdk targets 3.12 (and uses a good number of 3.12 typing features). That makes porting the code a bit more complicated, but it's not a blocker
  • tests haven't been ported yet
  • the original code had the following:
# TODO
# - [ ] Support text streaming
# - [ ] Support file streaming

I kept it as-is, though I'm a little bit confusing, because text streaming is working?

  • need more QA, testing I'm sure some things are broken :)
  • I didn't look at adding docs

@dgellow dgellow force-pushed the sam/implement-use-method branch from 284a681 to fc2ae30 Compare July 3, 2025 20:29
@dgellow dgellow force-pushed the sam/implement-use-method branch from fc2ae30 to a7b12dd Compare July 25, 2025 11:40
@dgellow dgellow requested a review from zeke July 25, 2025 16:02
@dgellow dgellow marked this pull request as ready for review July 25, 2025 16:02
@dgellow dgellow requested a review from a team as a code owner July 25, 2025 16:02
@dgellow
Copy link
Collaborator Author

dgellow commented Jul 25, 2025

@zeke Do you prefer:

  1. already merge that PR as-is, then continue with more focused PRs. That means linter checks will fail for the time being
  2. keep that PR open until everything is fixed

It's up to you, if you already want to try out replicate.use(), merging will make that easier.

@zeke
Copy link
Member

zeke commented Jul 25, 2025

Nice work, @dgellow. How about this:

  1. Turn CI green by fixing linter stuff
  2. Merge this and cut a prerelease so we can play around with it
  3. Follow up in other PRs for type checking, tests, and docs

I've updated the body of issue #32 with a task list to this effect, and updated your Fixes #32 comment above to Part of #32 so it won't automatically close the issue when we merge this.

Sound good?

@dgellow
Copy link
Collaborator Author

dgellow commented Jul 28, 2025

Sounds good, though I will have to take a few shortcuts to make CI green (the vast majority of linter complains are around type checking issues)

@dgellow dgellow merged commit 219641d into main Jul 31, 2025
7 checks passed
@dgellow dgellow deleted the sam/implement-use-method branch July 31, 2025 14:24
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.

3 participants