Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
42b2f5ef
Commit
42b2f5ef
authored
Dec 31, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b5667563
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AIStudentController.cs
Edu.WebApi/Controllers/AI/AIStudentController.cs
+4
-4
No files found.
Edu.WebApi/Controllers/AI/AIStudentController.cs
View file @
42b2f5ef
...
...
@@ -238,10 +238,10 @@ namespace Edu.WebApi.Controllers.AI
{
string
answer
=
string
.
Empty
;
// ChatClient client = new(model: "gpt-4o", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY"));
// 初始化客户端
var
api
=
new
OpenAIAPI
(
"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"
);
//
basicConfigureModel.ApiKey
// 调用GPT-3模型完成一段文本
var
api
=
new
OpenAIAPI
(
basicConfigureModel
.
ApiKey
);
// // 调用GPT-3模型完成一段文本
var
completionRequest
=
new
CompletionRequest
{
Model
=
"gpt-4o-mini"
,
...
...
@@ -342,7 +342,7 @@ namespace Edu.WebApi.Controllers.AI
model
.
TokenNum
,
model
.
KeyWordType
,
model
.
KeyWord
,
model
.
ResultInfo
,
model
.
ResultInfo
,
SupplierType
=
model
?.
SupplierType
??
0
,
PresetsApplicationName
=
model
?.
ApplicationName
??
""
,
SupplierName
=
model
?.
SupplierName
??
""
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment