mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-27 08:29:51 +03:00
fix REL.v1 parameter
This commit is contained in:
parent
99590803c6
commit
d559de345f
|
@ -546,7 +546,7 @@ on an upstream NER component for entities extraction.
|
||||||
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `labels` | List of labels or str of comma-separated list of labels. ~~Union[List[str], str]~~ |
|
| `labels` | List of labels or str of comma-separated list of labels. ~~Union[List[str], str]~~ |
|
||||||
| `template` | Custom prompt template to send to LLM model. Default templates for each task are located in the `spacy_llm/tasks/templates` directory. Defaults to [`rel.jinja`](https://github.com/explosion/spacy-llm/blob/main/spacy_llm/tasks/templates/rel.jinja). ~~str~~ |
|
| `template` | Custom prompt template to send to LLM model. Default templates for each task are located in the `spacy_llm/tasks/templates` directory. Defaults to [`rel.jinja`](https://github.com/explosion/spacy-llm/blob/main/spacy_llm/tasks/templates/rel.jinja). ~~str~~ |
|
||||||
| `label_description` | Dictionary providing a description for each relation label. Defaults to `None`. ~~Optional[Dict[str, str]]~~ |
|
| `label_definitions` | Dictionary providing a description for each relation label. Defaults to `None`. ~~Optional[Dict[str, str]]~~ |
|
||||||
| `examples` | Optional function that generates examples for few-shot learning. Defaults to `None`. ~~Optional[Callable[[], Iterable[Any]]]~~ |
|
| `examples` | Optional function that generates examples for few-shot learning. Defaults to `None`. ~~Optional[Callable[[], Iterable[Any]]]~~ |
|
||||||
| `normalizer` | Function that normalizes the labels as returned by the LLM. If `None`, falls back to `spacy.LowercaseNormalizer.v1`. Defaults to `None`. ~~Optional[Callable[[str], str]]~~ |
|
| `normalizer` | Function that normalizes the labels as returned by the LLM. If `None`, falls back to `spacy.LowercaseNormalizer.v1`. Defaults to `None`. ~~Optional[Callable[[str], str]]~~ |
|
||||||
| `verbose` | If set to `True`, warnings will be generated when the LLM returns invalid responses. Defaults to `False`. ~~bool~~ |
|
| `verbose` | If set to `True`, warnings will be generated when the LLM returns invalid responses. Defaults to `False`. ~~bool~~ |
|
||||||
|
@ -565,6 +565,7 @@ supports `.yml`, `.yaml`, `.json` and `.jsonl`.
|
||||||
[components.llm.task]
|
[components.llm.task]
|
||||||
@llm_tasks = "spacy.REL.v1"
|
@llm_tasks = "spacy.REL.v1"
|
||||||
labels = ["LivesIn", "Visits"]
|
labels = ["LivesIn", "Visits"]
|
||||||
|
|
||||||
[components.llm.task.examples]
|
[components.llm.task.examples]
|
||||||
@misc = "spacy.FewShotReader.v1"
|
@misc = "spacy.FewShotReader.v1"
|
||||||
path = "rel_examples.jsonl"
|
path = "rel_examples.jsonl"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user