Centralize API version for stateful calls The API version (currently "v1") used in stateful ChatGPT API calls has been centralized into a constant for improved management. Change-Id: Ifbfc0c056073d82b2a8e1c8f40c88312a5bfd18c Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/stateful/client/api/UriResourceLocatorStateful.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/stateful/client/api/UriResourceLocatorStateful.java index b56aa43..9480d76 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/stateful/client/api/UriResourceLocatorStateful.java +++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/mode/stateful/client/api/UriResourceLocatorStateful.java
@@ -1,16 +1,18 @@ package com.googlesource.gerrit.plugins.chatgpt.mode.stateful.client.api; public class UriResourceLocatorStateful { + private static final String VERSION_URI = "/v1"; + public static String filesCreateUri() { - return "/v1/files"; + return VERSION_URI + "/files"; } public static String assistantCreateUri() { - return "/v1/assistants"; + return VERSION_URI + "/assistants"; } public static String threadsUri() { - return "/v1/threads"; + return VERSION_URI + "/threads"; } public static String threadRetrieveUri(String threadId) {