Skip to content

Commit

Permalink
Merge pull request #232 from clarin-eric/miscfixes
Browse files Browse the repository at this point in the history
bug fix in tool calls with constant values
  • Loading branch information
andmor- authored Sep 16, 2021
2 parents 9997f7e + 9084b45 commit bca3b13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>0.0.0-SNAPSHOT</version>

<properties>
<dropwizard.version>2.0.23</dropwizard.version>
<dropwizard.version>2.0.24</dropwizard.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -52,17 +52,17 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.31</version>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions webui/src/actions/toolcall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ export function getInvocationURL(tool, resourceList) {
function getServiceParameter(param, resourceList, inputs, match) {
if (!param.bind) {
if (param.value) {
return param.value;
return [param.value];
} else {
console.error("missing param bind and value:", param);
return {error: "Incorrect tool specification: " + param.name};
return [{error: "Incorrect tool specification: " + param.name}];
}
}

const [inputID, bind] = param.bind.split("/");
const inputIndex = inputs.findIndex(input => input.id == inputID);
if (inputIndex < 0) {
console.error("cannot find input with id:", inputID);
return {error: "Incorrect tool specification: " + inputID};
return [{error: "Incorrect tool specification: " + inputID}];
}

const resourceIndices = findAllIndices(match, inputIndex);
Expand Down

0 comments on commit bca3b13

Please sign in to comment.