mscraftsman / generative-ai

Gemini AI SDK for .NET and ASP.NET Core enables developers to use Google's state-of-the-art generative AI models to build AI-powered features and applications.
https://mscraftsman.github.io/generative-ai/
Apache License 2.0
55 stars 11 forks source link

Request to add FileResource.Status field and enhance GenerateContent() to return detailed error information #33

Closed paveliciousness closed 1 month ago

paveliciousness commented 1 month ago

Request to extent API:

Add a Status field to the FileResource class to track the current status of the file resource.

1

Modify the GenerateContent() method to return detailed error information.

2

jochenkirstaetter commented 1 month ago

Hello @paveliciousness

Thanks for the suggestion. I'm currently working on general integration of ILogger to provide more detailed output. Would this be an alternative or addition to your suggestion?

Cheers, JoKi

paveliciousness commented 1 month ago

Hi @jochenkirstaetter,

Thank you for the update! Integrating ILogger sounds promising and could serve as a solid alternative. However, I believe that including JSON fields in custom exceptions or returning JSON in the exception messages would enhance our code-level handling.

Best regards, Pavel

jochenkirstaetter commented 1 month ago

Hi @paveliciousness

Thanks for your feedback. I'm working on more detailed info in case of an unexpected behaviour.

Using custom exceptions is an interesting approach which I was considering myself. Thanks for your suggestion.

Cheers, JoKi

jochenkirstaetter commented 1 month ago

Release in https://github.com/mscraftsman/generative-ai/releases/tag/v1.6.5