feat: add support for citations

BREAKING CHANGE: Changed type of public Source properties.
Updated `Source` property on `DocumentContent` and `ImageContent`
types to use base `Source` type

- include support for citing custom sources
- include support for citing PDF sources
- include support for citing text sources
This commit is contained in:
Stevan Freeborn
2025-06-14 13:44:10 -05:00
parent d50989833e
commit 5b8d88a01d
21 changed files with 450 additions and 123 deletions
@@ -558,8 +558,9 @@ public class MessageRequestTests : SerializationTest
var imageContent = messageRequest.Messages[0].Content[0] as ImageContent;
imageContent!.Type.Should().Be("image");
imageContent.Source.MediaType.Should().Be("image/jpeg");
imageContent.Source.Data.Should().Be("data");
imageContent.Source.As<ImageSource>().MediaType.Should().Be("image/jpeg");
imageContent.Source.As<ImageSource>().Data.Should().Be("data");
}
[Fact]