Closed Lenloo closed 1 year ago
没理解,能详细说说吗
譬如返回IAsyncEnumerablevar client = new ChatGPTClient(File.ReadAllText("KEY.txt"), "gpt-3.5-turbo"); IAsyncEnumerable<T> asyncResult = client.EnumerableAsync("你是谁?"); await foreach (var item in asyncResult) { onsole.WriteLine(item.Content); }
就类似这样
我觉得业务自行实现吧,async是挺标准的sdk方法了。
加入异步数据流的调用方法,边获取边输出。