Skip to content

Improper types for ctx.sample #1881

@strawgate

Description

@strawgate

Description

the messages is list[str | SamplingMessage], it should be a Sequence so users dont get type errors if they pass a list[str] or a list[SamplingMessage] and the return type can only be text, audio, image, not all the types in ContentBlock

Example Code

Version Information

latest

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions