Ticket T1259850
Visible to All Users

XAF Blazor v24.2EAP AI extension for Reporting

created 6 months ago

Hi,

I have the new AI options working well in my XAF Blazor project for the RichTextEditor (excellent by the way!)
but have not been able to get the new AI functions to work in Reports…

There are examples for Reporting AI option for non-XAF blazor apps but I am unable to get these working from XAF
Am I missing something ? or, are there any XAF blazor reporting examples showing the new AI options ?

In my startup.cs I have the following code… but when I design or run reports the AI options are not visible…

Code
services.AddDevExpressAI((config) => { var client = new ChatClientOllamaAIService("http://localhost:11434/api/chat", "llama3.2"); config.RegisterChatClientOllamaAIService("http://localhost:11434/api/chat", "llama3.2"); config.AddBlazorReportingAIIntegration(config => { config.SummarizeBehavior = SummarizeBehavior.Abstractive; config.AvailabelLanguages = new List<LanguageItem>() { new LanguageItem() { Key = "de", Text = "German" }, new LanguageItem() { Key = "es", Text = "Spanish" }, new LanguageItem() { Key = "en", Text = "English" } }; }); });

Thanks in advance

bw

Peter

Answers approved by DevExpress Support

created 6 months ago

Hello,

when I design or run reports the AI options are not visible

I created a simple XAF app v24.2 with the Reports module and added it to AI as described at Reporting for Blazor - Summarize and Translate DevExpress Reports Using Azure OpenAI

The example shows AI option as expected:

Please refer to the attached example and check how it works on your side. If it operates correctly, compare it with your project to find the difference that leads to the issue. If you can't find the cause of the issue, modify the attached project so that it illustrates the behavior you encountered and send it to us.

Thanks,
Andrey

    Comments (3)

      Thanks
      It turned out that as I'm using Ollama not OpenAI I had to add "RegisterEmbeddingOllamaAIService" call after the call to "RegisterChatClientOllamaAIService" & then it all works :-)

      C#
      config.RegisterChatClientOllamaAIService("http://localhost:11434/api/chat", "llama3.2"); config.RegisterEmbeddingOllamaAIService("http://localhost:11434/api/chat", "llama3.2");
      Andrey K (DevExpress Support) 6 months ago

        Hello,

        I am happy to hear that you found the solution. Thank you for keeping me informed.

        Andrey

        Dmitry Tokmachev (DevExpress) 6 months ago

          Hi Peter,

          I wanted to follow up with you: it seems unusual that everything only works as expected when you call the RegisterEmbeddingOllamaAIService method. You actually don’t need to register the embedding service to use reporting AI-powered features and especially, if you haven’t set embeddings or aren’t using them.

          Additionally, the embedding service typically has a different default endpoint, and models are also distinct (for example, http://localhost:11434/api/embeddings, model: all-minilm). Please refer to the following Ollama documentation to verify that everything is configured correctly: Ollama: Embedding Models.

          Best regards,
          Dmitry

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.