首页 新闻 会员 周边 捐助

Semantic Kernel: text generation 与 chat completion 的区别是什么

0
悬赏园豆:30 [已解决问题] 解决于 2024-02-12 10:52

在 Semantic Kernel 中有2个接口,分别是 ITextGenerationServiceIChatCompletionService,请问它们的区别是什么?

问题补充:

ITextGenerationService 与 IChatCompletionService 都继承了 IAIService 接口,

ITextGenerationService 接口中的方法:

  • GetTextContentsAsync
  • GetStreamingTextContentsAsync

IChatCompletionService 接口中的方法:

  • GetChatMessageContentsAsync
  • GetStreamingChatMessageContentsAsync

OpenAIChatCompletionService 同时实现了这2个接口

public sealed class OpenAIChatCompletionService : IChatCompletionService, ITextGenerationService
{ 
}
dudu的主页 dudu | 高人七级 | 园豆:30778
提问于:2024-02-11 19:57
< >
分享
最佳答案
0

关于 text generation 的解释:

Text generation is a technique that involves the creation of human-like text using artificial intelligence and machine learning algorithms. It enables computers to generate coherent and contextually relevant text based on patterns and structures learned from existing textual data.

来自 https://h2o.ai/wiki/text-generation/

关于 chat completion 的解释:

A chat completion is a way of generating text based on a prompt. The prompt is a piece of text that you provide, and the completion is the text that is generated by the model. The model is a machine learning model that has been trained on a large corpus of text, and the prompt is used to seed the model to generate the completion.

来自 Generative AI and .NET - Part 3 Chat Completions

dudu | 高人七级 |园豆:30778 | 2024-02-12 10:52

Microsoft.SemanticKernel.Connectors.HuggingFace 只实现了 ITextGenerationService 接口

dudu | 园豆:30778 (高人七级) | 2024-02-13 09:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册