添加询问李诫(AI 问答)功能

- 添加 AIChatComponent:用于主要的逻辑(构造请求,解析响应)
- 添加 AIChatForm:用于问答的页面展示
This commit is contained in:
SepComet
2026-02-25 17:25:09 +08:00
parent b00ea1a14f
commit f8c0f46c36
70 changed files with 7059 additions and 607 deletions
@@ -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
@@ -55,5 +55,7 @@ namespace UI
BubbleDialogForm = 106,
MainOverlayForm = 107,
AIChatForm = 108,
}
}