Skip to content

Commit

Permalink
返答までの時間が長いモデルがあることも踏まえて、これまで5秒返答がなければ打ち切りだったところを、10秒までは待つようにした。
Browse files Browse the repository at this point in the history
  • Loading branch information
komiyamma committed Feb 1, 2025
1 parent 0de02a2 commit 221272a
Show file tree
Hide file tree
Showing 44 changed files with 48 additions and 50 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HmOpenAiGpt/.vs/HmOpenAiGpt/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HmOpenAiGpt/.vs/HmOpenAiGpt/v17/.futdcache.v2
Binary file not shown.
Binary file modified HmOpenAiGpt/.vs/HmOpenAiGpt/v17/.suo
Binary file not shown.
21 changes: 10 additions & 11 deletions HmOpenAiGpt/.vs/HmOpenAiGpt/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\openaichatsession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\openaichatsession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
Expand All @@ -18,6 +14,10 @@
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\openaicontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\openaicontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\questionfilewatcher.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\questionfilewatcher.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
Expand Down Expand Up @@ -115,7 +115,7 @@
"RelativeDocumentMoniker": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\HmOpenAiGpt.csproj",
"RelativeToolTip": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAWAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2024-06-03T05:38:39.119Z",
"EditorCaption": ""
Expand All @@ -131,7 +131,7 @@
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 3,
"Title": "HmOpenAiGpt",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\HmOpenAiGpt.csproj",
"RelativeDocumentMoniker": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
Expand Down Expand Up @@ -167,29 +167,28 @@
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 1,
"Title": "OpenAIChatSession.cs",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIChatSession.cs",
"RelativeDocumentMoniker": "HmOpenAiGpt\\OpenAIChatSession.cs",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIChatSession.cs",
"RelativeToolTip": "HmOpenAiGpt\\OpenAIChatSession.cs",
"ViewState": "AgIAABEAAAAAAAAAAAAlwCwAAAAaAAAAAAAAAA==",
"ViewState": "AgIAADMAAAAAAAAAAAAIwDsAAAAZAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-03T02:43:34.614Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 2,
"Title": "OpenAIController.cs",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIController.cs",
"RelativeDocumentMoniker": "HmOpenAiGpt\\OpenAIController.cs",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIController.cs",
"RelativeToolTip": "HmOpenAiGpt\\OpenAIController.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAMAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-03T02:43:14.634Z",
"EditorCaption": ""
"WhenOpened": "2024-06-03T02:43:14.634Z"
}
]
}
Expand Down
21 changes: 10 additions & 11 deletions HmOpenAiGpt/.vs/HmOpenAiGpt/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\openaichatsession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\openaichatsession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
Expand All @@ -18,6 +14,10 @@
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\openaicontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\openaicontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\hmopenaigpt.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
},
{
"AbsoluteMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|g:\\repogitory\\hm_openai_gpt\\hmopenaigpt\\hmopenaigpt\\questionfilewatcher.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{5A9EE4EE-8DD3-4A2B-8C70-8460523F5F96}|HmOpenAiGpt\\HmOpenAiGpt.csproj|solutionrelative:hmopenaigpt\\questionfilewatcher.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
Expand Down Expand Up @@ -115,7 +115,7 @@
"RelativeDocumentMoniker": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\HmOpenAiGpt.csproj",
"RelativeToolTip": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAWAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2024-06-03T05:38:39.119Z",
"EditorCaption": ""
Expand All @@ -131,7 +131,7 @@
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 3,
"Title": "HmOpenAiGpt",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\HmOpenAiGpt.csproj",
"RelativeDocumentMoniker": "HmOpenAiGpt\\HmOpenAiGpt.csproj",
Expand Down Expand Up @@ -167,29 +167,28 @@
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 1,
"Title": "OpenAIChatSession.cs",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIChatSession.cs",
"RelativeDocumentMoniker": "HmOpenAiGpt\\OpenAIChatSession.cs",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIChatSession.cs",
"RelativeToolTip": "HmOpenAiGpt\\OpenAIChatSession.cs",
"ViewState": "AgIAABEAAAAAAAAAAAAlwCwAAAAaAAAAAAAAAA==",
"ViewState": "AgIAADMAAAAAAAAAAAAIwDsAAAAZAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-03T02:43:34.614Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 2,
"Title": "OpenAIController.cs",
"DocumentMoniker": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIController.cs",
"RelativeDocumentMoniker": "HmOpenAiGpt\\OpenAIController.cs",
"ToolTip": "G:\\repogitory\\hm_openai_gpt\\HmOpenAiGpt\\HmOpenAiGpt\\OpenAIController.cs",
"RelativeToolTip": "HmOpenAiGpt\\OpenAIController.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAMAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-03T02:43:14.634Z",
"EditorCaption": ""
"WhenOpened": "2024-06-03T02:43:14.634Z"
}
]
}
Expand Down
Binary file modified HmOpenAiGpt/.vs/ProjectEvaluation/hmopenaigpt.metadata.v9.bin
Binary file not shown.
Binary file modified HmOpenAiGpt/.vs/ProjectEvaluation/hmopenaigpt.projects.v9.bin
Binary file not shown.
Binary file modified HmOpenAiGpt/.vs/ProjectEvaluation/hmopenaigpt.strings.v9.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions HmOpenAiGpt/HmOpenAiGpt/HmOpenAiGpt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AssemblyVersion>1.2.0.3</AssemblyVersion>
<FileVersion>1.2.0.3</FileVersion>
<Version>1.2.0.3</Version>
<AssemblyVersion>1.2.0.4</AssemblyVersion>
<FileVersion>1.2.0.4</FileVersion>
<Version>1.2.0.4</Version>
<Authors>Akitsugu Komiyama</Authors>
<Copyright>2024-2025 @ $(Authors)</Copyright>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions HmOpenAiGpt/HmOpenAiGpt/OpenAIChatSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void InitMessages()



// AIからの返答がどうも進んでいない、といったことを判定する。5秒進んでいないようだと、キャンセルを発動する。
// AIからの返答がどうも進んでいない、といったことを判定する。10秒進んでいないようだと、キャンセルを発動する。
bool conversationUpdateCancel = false;

async Task conversationUpdateCheck()
Expand All @@ -69,7 +69,7 @@ async Task conversationUpdateCheck()
// Console.WriteLine("今回の会話タスクが終了したため、conversationUpdateCheckを終了");
break;
}
await Task.Delay(100); // 5秒ごとにチェック
await Task.Delay(100); // 10秒ごとにチェック

if (lastConversationUpdateCount == conversationUpdateCount)
{
Expand All @@ -81,7 +81,7 @@ async Task conversationUpdateCheck()
iTickCount = 0;
}

if (iTickCount > 50)
if (iTickCount > 100)
{
iTickCount = 0;
// Console.WriteLine("AIからの応答の進捗がみられないため、キャンセル発行");
Expand Down
Loading

0 comments on commit 221272a

Please sign in to comment.