Skip to content

Commit

Permalink
add one function to set all the proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Barqawiz committed Jun 11, 2023
1 parent 33b76c5 commit e31acb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IntelliNode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "intellinode",
"version": "0.0.29",
"version": "0.0.31",
"description": "Access various AI models, such as ChatGPT, Diffusion, Cohere, Google, and others",
"main": "index.js",
"keywords": ["AI", "ChatGPT", "GPT4", "stable diffusion", "openai", "huggingface", "language models", "image generation", "speech synthesis", "semantic search"],
Expand Down
10 changes: 10 additions & 0 deletions IntelliNode/utils/ProxyHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ class ProxyHelper {
this._openaiURL = url;
}

setOpenaiProxyValues(proxySettings) {
this._openaiURL = proxySettings.url || config.getProperty('url.openai.base');
this._openaiCompletion = proxySettings.completions || config.getProperty('url.openai.completions');
this._openaiChatGPT = proxySettings.chatgpt || config.getProperty('url.openai.chatgpt');
this._openaiImage = proxySettings.imagegenerate || config.getProperty('url.openai.imagegenerate');
this._openaiEmbed = proxySettings.embeddings || config.getProperty('url.openai.embeddings');
this._openai_type = 'openai';
this._resourceName = '';
}

setAzureOpenai(resourceName) {
if (!resourceName) {
throw new Error("Set your azure resource name");
Expand Down

0 comments on commit e31acb7

Please sign in to comment.