Skip to content

Commit ee8c904

Browse files
committed
Read LLM endpoint from settings
Signed-off-by: Abdessamad TEMMAR <[email protected]>
1 parent 90491d6 commit ee8c904

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

addOns/llm/src/main/java/org/zaproxy/addon/llm/ui/ImportDialog.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public class ImportDialog extends AbstractDialog {
6565
private JButton buttonCancel;
6666
private JButton buttonImport;
6767
private JProgressBar progressBar;
68-
private LlmOptionsParam llmOptionsParam;
6968

7069
public ImportDialog(JFrame parent, final ExtensionLlm extLlm) {
7170
super(parent, true);
@@ -116,7 +115,7 @@ private boolean importSwagger()
116115
throws IOException, URISyntaxException, ApiException, DatabaseException {
117116

118117
String swaggerLocation = getSwaggerField().getText();
119-
llmOptionsParam = extLlm.getOptionsParam();
118+
LlmOptionsParam llmOptionsParam = extLlm.getOptionsParam();
120119
Integer endpointCount = 0;
121120

122121
if (StringUtils.isEmpty(llmOptionsParam.getApiKey())) {
@@ -133,7 +132,7 @@ private boolean importSwagger()
133132

134133
LlmCommunicationService llmCommunicationService =
135134
new LlmCommunicationService(
136-
llmOptionsParam.getModelName(), llmOptionsParam.getApiKey(), "");
135+
llmOptionsParam.getModelName(), llmOptionsParam.getApiKey(), llmOptionsParam.getEndpoint());
137136

138137
if (StringUtils.isEmpty(swaggerLocation)) {
139138
ThreadUtils.invokeAndWaitHandled(

0 commit comments

Comments
 (0)