Skip to content

Commit

Permalink
Update prefix constants in OllamaExtractor for better namespace clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Dec 22, 2024
1 parent ad9c1c2 commit e1531fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ Add the following properties to the system.properties file:

```
ollama.endpoint=http://your-ollama-endpoint
ollama.model.text_plain=default-text-model
ollama.prompt.text_plain=Summarize the following text: [[INPUT_TEXT]]
ollama.model.image_jpg=image-classification-model
ollama.prompt.image_jpg=Describe this image.
ollama.extractor.model.image_jpg=image-classification-model
ollama.extractor.prompt.image_jpg=Describe this image.
```

Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public class OllamaExtractor extends AbstractExtractor {

protected static final String OLLAMA_ENDPOINT = "ollama.endpoint";

protected static final String OLLAMA_PROMPT_PREFIX = "ollama.prompt.";
protected static final String OLLAMA_PROMPT_PREFIX = "ollama.extractor.prompt.";

protected static final String OLLAMA_MODEL_PREFIX = "ollama.model.";
protected static final String OLLAMA_MODEL_PREFIX = "ollama.extractor.model.";

protected static final String TEXT_PLACEHOLDER = "[[INPUT_TEXT]]";

Expand Down
5 changes: 1 addition & 4 deletions src/main/resources/crawler/extractor+ollamaExtractor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
<postConstruct name="register">
<arg>[
"image/jpeg",
"image/png",
"text/html",
"text/plain",
"text/xml"
"image/png"
]
</arg>
</postConstruct>
Expand Down

0 comments on commit e1531fe

Please sign in to comment.