添加询问李诫(AI 问答)功能
- 添加 AIChatComponent:用于主要的逻辑(构造请求,解析响应) - 添加 AIChatForm:用于问答的页面展示
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Definition.DataStruct
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class OpenAIChatRequest
|
||||
{
|
||||
public string model;
|
||||
public bool stream;
|
||||
public double temperature;
|
||||
public List<OpenAIMessage> messages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ae65566eea74645bfbebbd8edc2eeb2
|
||||
timeCreated: 1772005238
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Definition.DataStruct
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class OpenAIMessage
|
||||
{
|
||||
public string role;
|
||||
public string content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da985afe4cdd41b985cdc55b16669248
|
||||
timeCreated: 1772005281
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Definition.DataStruct
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class OpenAIStreamChoice
|
||||
{
|
||||
public int index;
|
||||
public OpenAIStreamDelta delta;
|
||||
public string finish_reason;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68ead73e1887412caf82bc156fe7960b
|
||||
timeCreated: 1772005319
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace Definition.DataStruct
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class OpenAIStreamChunk
|
||||
{
|
||||
public string id;
|
||||
public string @object;
|
||||
public int created;
|
||||
public string model;
|
||||
public OpenAIStreamChoice[] choices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8aaa860de9da4771a22469c918a8346e
|
||||
timeCreated: 1772005300
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Definition.DataStruct
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class OpenAIStreamDelta
|
||||
{
|
||||
public string role;
|
||||
public string content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 151022fd6325477aa9810f1914030419
|
||||
timeCreated: 1772005339
|
||||
Reference in New Issue
Block a user