Skip to content

Commit

Permalink
On branch 6295-usability-concerns Fixes #32
Browse files Browse the repository at this point in the history
modified:   .scripts/setup-env-variables-template.sh
modified:   README.md
modified:   src/main/java/org/eclipse/pathfinder/api/GraphTraversalService.java

Signed-off-by: Ed Burns <[email protected]>
  • Loading branch information
edburns committed Oct 29, 2024
1 parent b78d003 commit dec656c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .scripts/setup-env-variables-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export RESOURCE_GROUP_NAME="abc1110rg" # customize this
export LOCATION=eastus # customize this, if desired

export APPINSIGHTS_NAME="appinsights$(date +%s)"
export DB_NAME=${DB_RESOURCE_NAME}
export DB_NAME=libertydb
export DB_PASSWORD="Secret123456" # PostgreSQL database password
export DB_PORT_NUMBER=5432
export DB_SERVER_NAME="${DB_RESOURCE_NAME}.postgres.database.azure.com" # PostgreSQL host name
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ The steps in this section guide you to deploy supporting resources with the GitH
* `DB_RESOURCE_NAME` must be the name of the database resource, such as `liberty-dbs-1148487969748`. Find this value by entering the resource group in which the workflow deployed the database and selecting the database resource.
* `DB_NAME` must be `postgres`.
* `DB_NAME` must be `libertydb`.
* If using the AI shortest path feature, set the `AZURE_OPENAI` variables as described in Unit 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ public List<TransitPath> findShortestPath(
@Size(min = 8, max = 8, message = "Deadline value must be eight characters long.")
@QueryParam("deadline")
String deadline) {
if (!System.getenv("AZURE_OPENAI_ENDPOINT").isEmpty()
&& !System.getenv("AZURE_OPENAI_KEY").isEmpty()) {
String endpoint = System.getenv("AZURE_OPENAI_ENDPOINT");
String key = System.getenv("AZURE_OPENAI_KEY");
if ((null != endpoint && !endpoint.isEmpty()) && (null != key && !key.isEmpty())) {
String shortestPath = getShortestPathWithTimeout(originUnLocode, destinationUnLocode);
if (isValidJsonUsingJsonP(shortestPath) && !shortestPath.equals("[]")) {
Jsonb jsonb = JsonbBuilder.create();
Expand Down

0 comments on commit dec656c

Please sign in to comment.