最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

artificial intelligence - Microsoft.Extensions.AI responses output JSON when custom functions are used - Stack Overflow

programmeradmin3浏览0评论

I'm using Microsoft.Extensions.AI to run queries against numerous Ollama models that I have installed. I have added a custom functions (AIFunction type) by creating a ChatOptions instance and passing it into CompleteAsync() when calling models.

I know that some models do not support custom functions. However, out of those that definitely do, some return JSON in the response body instead of returning normal text. They return it regardless of whether my custom function was called or not.

How can I fix this?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论