Closed vladtar closed 1 month ago
The changes introduced in this pull request involve the addition of an isDevelopment
function to determine the application's environment, which is utilized in various components to conditionally set URLs based on whether the application is in development mode. The MyDataHelpsAIAssistant
class and GraphingTool
function have been updated to use this new function for setting their respective URLs. Additionally, the isDevelopment
function has replaced a local definition in providerIDs.ts
, streamlining the logic for determining provider IDs.
File Path | Change Summary |
---|---|
src/helpers/AIAssistant/AIAssistant.ts | - Added import for isDevelopment . - Modified MyDataHelpsAIAssistant constructor to conditionally set baseUrl . - Updated ask method's configurable object to include participantId . |
src/helpers/AIAssistant/Tools.ts | - Added import for isDevelopment . - Updated GraphingTool to conditionally set codeRunnerUrl . - Minor formatting adjustments in SaveLastGraphTool . |
src/helpers/env.ts | - Introduced isDevelopment function to check if the application is in a development environment. |
src/helpers/providerIDs.ts | - Removed local isDevelopment function and imported it from ./env . - Retained logic for determining provider IDs using the imported function. |
sequenceDiagram
participant App
participant AIAssistant
participant Tools
participant Env
App->>Env: Check environment
Env-->>App: Return isDevelopment status
App->>AIAssistant: Initialize with baseUrl
AIAssistant->>Tools: Initialize GraphingTool with codeRunnerUrl
Tools-->>AIAssistant: Return initialized tool
AIAssistant-->>App: Ready to process requests
Overview
Explain your changes, including any issues or relevant context about why they are needed.
For reference these urls come from outputs from deploying https://github.com/CareEvolution/SecurityAndChangeControl/blob/master/src/aws/pep/qa/open-ai-proxy/terragrunt.hcl
Security
REMINDER: All file contents are public.
Describe briefly what security risks you considered, why they don't apply, or how they've been mitigated.
Checklist
Testing
Documentation
Consider "Squash and merge" as needed to keep the commit history reasonable on
main
.Reviewers
Assign to the appropriate reviewer(s). Minimally, a second set of eyes is needed ensure no non-public information is published. Consider also including:
Summary by CodeRabbit
New Features
isDevelopment
function to check the application environment.baseUrl
andcodeRunnerUrl
based on the development environment.Bug Fixes
ask
method ofMyDataHelpsAIAssistant
.Refactor
isDevelopment
from theenv
module.