Skip to content

Commit

Permalink
Merge pull request #72 from pufflyai/71-ps-sdk-use-the-prompt-studio-…
Browse files Browse the repository at this point in the history
…service-url-flag

71 ps sdk use the prompt studio service url flag
  • Loading branch information
au-re authored Oct 15, 2023
2 parents 703f4c9 + 5e1d7c9 commit d0f35dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.19.10"
"version": "0.19.11"
}
4 changes: 2 additions & 2 deletions packages/@pufflig/ps-nodes/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pufflig/ps-nodes",
"private": false,
"version": "0.19.10",
"version": "0.19.11",
"description": "Collection of nodes used in Prompt Studio",
"files": [
"dist"
Expand Down Expand Up @@ -35,7 +35,7 @@
"@dqbd/tiktoken": "^1.0.7",
"@pufflig/ps-models": "^0.19.9",
"@pufflig/ps-nodes-config": "^0.19.10",
"@pufflig/ps-sdk": "^0.19.9",
"@pufflig/ps-sdk": "^0.19.11",
"axios": "^1.5.0",
"langchain": "^0.0.160",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/@pufflig/ps-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pufflig/ps-sdk",
"version": "0.19.9",
"version": "0.19.11",
"license": "MIT",
"main": "./dist/ps-sdk.umd.js",
"module": "./dist/ps-sdk.es.js",
Expand Down
5 changes: 1 addition & 4 deletions packages/@pufflig/ps-sdk/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
export const SERVICE_URL = "https://api.prompt.studio/api/v1/completion";

export const getServiceUrl = () => {
if (process.env.PROMPT_STUDIO_RUNTIME === "local") {
return "http://localhost:8088/api/v1/completion";
}
return SERVICE_URL;
return process.env.PROMPT_STUDIO_SERVICE_URL || SERVICE_URL;
};

0 comments on commit d0f35dc

Please sign in to comment.