Conversation
Only need a NUA key by default now. Removed region, added API URL as a fallback. Touched up logging some more, needed to get the filename in there for debug purposes.
|
Copyright Validation Results ✅ Valid Files
✅ All files have valid copyright headers! |
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Nuclia integration by replacing the region-based API key approach with a single NUA key configuration. The NUA key is now the only required option, with the API URL configurable as an optional fallback instead of requiring a region specification.
Changes:
- Replaced
WRITE_NUCLIA_API_KEYwithWRITE_NUCLIA_NUA_KEYand removedWRITE_NUCLIA_REGIONrequirement - Introduced a Builder pattern for
NucliaClientconstruction with optional API URL configuration - Updated test files to use the new NUA key environment variable and option naming
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| NucliaAdHocTest.java | Updated test to use new NUCLIA_NUA_KEY environment variable and removed region configuration |
| DocumentPipelineFactoryTest.java | Updated all test cases to use new NUA key option and removed region-related test |
| NucliaClient.java | Refactored to use Builder pattern with NUA key, added default API URL, and removed region parameter |
| DocumentPipelineFactory.java | Updated to use Builder pattern for NucliaClient construction with optional API URL |
| Options.java | Renamed API key option to NUA key and replaced region option with API URL |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| this.baseUrl = builder.apiUrl; | ||
| this.timeoutSeconds = builder.timeoutSeconds; | ||
|
|
||
| this.httpClient = new OkHttpClient.Builder().build(); |
There was a problem hiding this comment.
The HTTP client is created without applying the timeout configuration from builder.timeoutSeconds. The read timeout should be set using .readTimeout(builder.timeoutSeconds, TimeUnit.SECONDS) in the builder chain.
| this.httpClient = new OkHttpClient.Builder().build(); | |
| this.httpClient = new OkHttpClient.Builder() | |
| .readTimeout(this.timeoutSeconds, TimeUnit.SECONDS) | |
| .build(); |
Only need a NUA key by default now. Removed region, added API URL as a fallback. Touched up logging some more, needed to get the filename in there for debug purposes.