mirror of
https://github.com/gnh1201/welsonjs.git
synced 2026-04-18 18:18:42 +00:00
Rename AzureAiService keys to AzureCognitive
Rename AzureAiService resource keys and app settings to AzureCognitive across the launcher. Updated Properties/Resources.Designer.cs to use AzureCognitive* properties, changed Resources.resx keys and the service prefix value, and updated app.config appSettings keys accordingly. Also adjusted editor.html to use the new setting names and user-facing "Azure Cognitive" wording and updated how the chat completions URL is constructed to use the AzureCognitive* settings.
This commit is contained in:
parent
ef6ff90e39
commit
ec85cc88e4
|
|
@ -81,27 +81,27 @@ namespace WelsonJS.Launcher.Properties {
|
|||
/// <summary>
|
||||
/// 과(와) 유사한 지역화된 문자열을 찾습니다.
|
||||
/// </summary>
|
||||
internal static string AzureAiServiceApiKey {
|
||||
internal static string AzureCognitiveApiKey {
|
||||
get {
|
||||
return ResourceManager.GetString("AzureAiServiceApiKey", resourceCulture);
|
||||
return ResourceManager.GetString("AzureCognitiveApiKey", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2024-05-01-preview과(와) 유사한 지역화된 문자열을 찾습니다.
|
||||
/// </summary>
|
||||
internal static string AzureAiServiceApiVersion {
|
||||
internal static string AzureCognitiveApiVersion {
|
||||
get {
|
||||
return ResourceManager.GetString("AzureAiServiceApiVersion", resourceCulture);
|
||||
return ResourceManager.GetString("AzureCognitiveApiVersion", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// https://ai-catswords656881030318.services.ai.azure.com/과(와) 유사한 지역화된 문자열을 찾습니다.
|
||||
/// https://catswords-ai-resource.services.ai.azure.com/과(와) 유사한 지역화된 문자열을 찾습니다.
|
||||
/// </summary>
|
||||
internal static string AzureAiServicePrefix {
|
||||
internal static string AzureCognitivePrefix {
|
||||
get {
|
||||
return ResourceManager.GetString("AzureAiServicePrefix", resourceCulture);
|
||||
return ResourceManager.GetString("AzureCognitivePrefix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,11 +160,11 @@
|
|||
<data name="ChromiumDevToolsPrefix" xml:space="preserve">
|
||||
<value>http://localhost:9222/</value>
|
||||
</data>
|
||||
<data name="AzureAiServiceApiKey" xml:space="preserve">
|
||||
<data name="AzureCognitiveApiKey" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="AzureAiServicePrefix" xml:space="preserve">
|
||||
<value>https://ai-catswords656881030318.services.ai.azure.com/</value>
|
||||
<data name="AzureCognitivePrefix" xml:space="preserve">
|
||||
<value>https://catswords-ai-resource.services.ai.azure.com/</value>
|
||||
</data>
|
||||
<data name="DnsServerAddress" xml:space="preserve">
|
||||
<value>1.1.1.1</value>
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
<data name="BlobStoragePrefix" xml:space="preserve">
|
||||
<value>https://catswords.blob.core.windows.net/welsonjs/</value>
|
||||
</data>
|
||||
<data name="AzureAiServiceApiVersion" xml:space="preserve">
|
||||
<data name="AzureCognitiveApiVersion" xml:space="preserve">
|
||||
<value>2024-05-01-preview</value>
|
||||
</data>
|
||||
<data name="BlobConfigUrl" xml:space="preserve">
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
<add key="ChromiumDevToolsTimeout" value="5"/>
|
||||
<add key="ChromiumExecutablePath" value="msedge.exe"/>
|
||||
<add key="ChromiumAppMode" value="true"/>
|
||||
<add key="AzureAiServicePrefix" value="https://ai-catswords656881030318.services.ai.azure.com/"/>
|
||||
<add key="AzureAiServiceApiKey" value=""/>
|
||||
<add key="AzureAiServiceApiVersion" value="2024-05-01-preview"/>
|
||||
<add key="AzureCognitivePrefix" value="https://ai-catswords656881030318.services.ai.azure.com/"/>
|
||||
<add key="AzureCognitiveApiKey" value=""/>
|
||||
<add key="AzureCognitiveApiVersion" value="2024-05-01-preview"/>
|
||||
<add key="WhoisServerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois.jsc"/>
|
||||
<add key="WhoisReferrerUrl" value="https://xn--c79as89aj0e29b77z.xn--3e0b707e/kor/whois/whois.jsp"/>
|
||||
<add key="WhoisClientAddress" value="141.101.82.1"/>
|
||||
|
|
|
|||
|
|
@ -551,16 +551,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
appendTextToEditor(`\n// ${promptMessage}... Generating text with Azure AI...`);
|
||||
appendTextToEditor(`\n// ${promptMessage}... Generating text with Azure Cognitive...`);
|
||||
pushPromptMessage("user", promptMessage);
|
||||
|
||||
const apiKey = settingsRef.current.AzureAiServiceApiKey;
|
||||
const apiKey = settingsRef.current.AzureCognitiveApiKey;
|
||||
if (!apiKey || apiKey.trim() == '') {
|
||||
alert("Azure AI API key is not set.");
|
||||
alert("Azure Cognitive API key is not set.");
|
||||
return;
|
||||
}
|
||||
|
||||
const url = `${settingsRef.current.AzureAiServicePrefix}models/chat/completions?api-version=${settingsRef.current.AzureAiServiceApiVersion}`;
|
||||
const url = `${settingsRef.current.AzureCognitivePrefix}models/chat/completions?api-version=${settingsRef.current.AzureCognitiveApiVersion}`;
|
||||
|
||||
const data = {
|
||||
messages: promptMessagesRef.current,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user