Jack Collins

Results 67 comments of Jack Collins

Another option here for return types that might be neater than `Annotated` is to extend pydantic's `ConfigDict` to add an `openai_strict` field so that this setting gets tracked on the...

@mnicstruwig @CiANSfi Support added for "strict" in https://github.com/jackmpcollins/magentic/releases/tag/v0.32.0 using an extended `ConfigDict`. See the release note for examples, and docs page for more info https://magentic.dev/structured-outputs/#configdict magentic still uses tools for...

For third party types you can modify the type as shown in the [pydantic docs for Strict Mode](https://docs.pydantic.dev/latest/concepts/strict_mode/#dataclasses-and-typeddict), but for python builtins you will have to subclass and add this...

You could try it via the `LitellmChatModel` since they seem to support it https://docs.litellm.ai/docs/providers/bedrock From the docs here https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html , the request (including messages) and response are different between the...

@barapa I think this out of scope for magentic. You will have to use https://github.com/Belval/pdf2image or another library to convert from PDF to one of those supported formats.

Anthropic now allows sending PDF document bytes, and magentic https://github.com/jackmpcollins/magentic/releases/tag/v0.35.0 supports this using the `DocumentBytes` object. See https://magentic.dev/vision/#documentbytes --- `DocumentBytes` is used to provide a document as bytes to the...

Closing this issue as doing the image -> PDF conversion is out of scope for magentic. Hopefully OpenAI adds PDF support too. This would likely be mentioned on their Vision...

Also add support for the other content types allowed by Vertex AI: Cloud Storage bucket URI, HTTP URL, YouTube video URL https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#filedata

- Cover parameter-validation errors (wrong/missing args) and exceptions that surface mid-stream? - Wrap param errors in a new ToolValidationError, and streamed exceptions in ToolStreamError, then convert both to a ToolResultMessage...

Hi @ashwin153 Currently there's no way to provide a dynamic number of images. If it's always the same number of images you can use `Placeholder` for each one. https://magentic.dev/vision/#placeholder To...