切换项目结构

This commit is contained in:
lihanbo 2025-02-28 09:20:53 +08:00
parent a6d1c966d8
commit 6c02a38c3f
72 changed files with 147 additions and 28 deletions

Binary file not shown.

Binary file not shown.

BIN
.vs/ExcelHelper/v17/.suo Normal file

Binary file not shown.

BIN
.vs/ExcelHelper/v17/.wsuo Normal file

Binary file not shown.

View File

@ -0,0 +1,65 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\code\\source\\repos\\ExcelHelper\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\ExcelHelper\\ExcelHelper.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 7,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:133:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:134:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ExcelHelper.csproj",
"DocumentMoniker": "D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj",
"RelativeDocumentMoniker": "src\\ExcelHelper\\ExcelHelper.csproj",
"ToolTip": "D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj",
"RelativeToolTip": "src\\ExcelHelper\\ExcelHelper.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2025-02-28T01:19:10.825Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@ -0,0 +1,65 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\code\\source\\repos\\ExcelHelper\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\ExcelHelper\\ExcelHelper.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 7,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:133:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:134:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ExcelHelper.csproj",
"DocumentMoniker": "D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj",
"RelativeDocumentMoniker": "src\\ExcelHelper\\ExcelHelper.csproj",
"ToolTip": "D:\\code\\source\\repos\\ExcelHelper\\src\\ExcelHelper\\ExcelHelper.csproj",
"RelativeToolTip": "src\\ExcelHelper\\ExcelHelper.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2025-02-28T01:19:10.825Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@ -0,0 +1 @@
{"ShowEmptyProjects":false,"CustomColumnOrderings":{"name":0,"file-path":1,"file-name":2,"neutral-value":3,"neutral-comment":4,"type":5},"ShowValidationErrors":true,"SelectedResourceGroupsByProject":{"D:\\code\\source\\repos\\ExcelHelper\\ExcelHelper.csproj":[]},"VisibleColumnKeys":["name","neutral-value","neutral-comment"]}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
.vs/ProjectSettings.json Normal file
View File

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}

View File

@ -0,0 +1,9 @@
{
"ExpandedNodes": [
"",
"\\src",
"\\src\\ExcelHelper"
],
"SelectedNode": "\\src\\ExcelHelper\\ExcelHelper.csproj",
"PreviewInSolutionExplorer": false
}

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

View File

@ -1,25 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExcelHelper", "ExcelHelper.csproj", "{C7A7E24D-513F-4D66-9953-42EDBD0038B7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C7A7E24D-513F-4D66-9953-42EDBD0038B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7A7E24D-513F-4D66-9953-42EDBD0038B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7A7E24D-513F-4D66-9953-42EDBD0038B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7A7E24D-513F-4D66-9953-42EDBD0038B7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F92EF236-3F64-4327-8CF6-C6FDBDC7939E}
EndGlobalSection
EndGlobal

View File

@ -16,12 +16,12 @@ class AiHelper
/// <summary>
/// 火山引擎
/// </summary>
private const string API_KEY = "";
private const string API_KEY = "58e5c6fd-a5da-400e-b889-715febce478f";
private const string API_ENDPOINT = "https://ark.cn-beijing.volces.com/api/v3/";
private readonly IChatClient _client;
private bool UseTool = false;
private readonly bool UseTool = false;
public AiHelper(string modelName, bool useTools = false)
{
UseTool = useTools;
@ -52,7 +52,7 @@ class AiHelper
{
// 获取所有的工具函数
//var toolsList = AgentExecutor.GetDefaultTools();
ChatOptions chatOptions = new ChatOptions
var chatOptions = new ChatOptions
{
// TODO: Models config
TopK= 10,
@ -65,6 +65,7 @@ class AiHelper
{
//TODO: add function call
}
await foreach (var response in _client.GetStreamingResponseAsync(question, chatOptions))
{
yield return response.Text;