Skip to content

Commit

Permalink
remove logic about replace quota for finetuning model (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#289)

* remove logic about replace quota for finetuning model

Signed-off-by: xinyual <xinyual@amazon.com>

* change logic to omit replace on finetune

Signed-off-by: xinyual <xinyual@amazon.com>

* change equal logic

Signed-off-by: xinyual <xinyual@amazon.com>

* fix logic error

Signed-off-by: xinyual <xinyual@amazon.com>

---------

Signed-off-by: xinyual <xinyual@amazon.com>
  • Loading branch information
xinyual authored Apr 18, 2024
1 parent b55adde commit 44b7adc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/opensearch/agent/tools/PPLTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ private String parseOutput(String llmOutput, String indexName) {
throw new IllegalArgumentException("The returned PPL: " + llmOutput + " has wrong format");
}
}
ppl = ppl.replace("`", "");
if (this.pplModelType != PPLModelType.FINETUNE) {
ppl = ppl.replace("`", "");
}
ppl = ppl.replaceAll("\\bSPAN\\(", "span(");
if (this.head > 0) {
String[] lists = llmOutput.split("\\|");
Expand Down

0 comments on commit 44b7adc

Please sign in to comment.