mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-03 19:33:19 +03:00
Fix references to examples and template.
This commit is contained in:
parent
52c5daa4f6
commit
6265e0c528
|
@ -254,15 +254,15 @@ defined target language.
|
||||||
> target_lang = "Spanish"
|
> target_lang = "Spanish"
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
| Argument | Description |
|
| Argument | Description |
|
||||||
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `template` | Custom prompt template to send to LLM model. Defaults to [summarization.v1.jinja](https://github.com/explosion/spacy-llm/blob/main/spacy_llm/tasks/templates/summarization.v1.jinja). ~~str~~ |
|
| `template` | Custom prompt template to send to LLM model. Defaults to [translation.v1.jinja](https://github.com/explosion/spacy-llm/blob/main/spacy_llm/tasks/templates/translation.v1.jinja). ~~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]]]~~ |
|
||||||
| `parse_responses` (NEW) | Callable for parsing LLM responses for this task. Defaults to the internal parsing method for this task. ~~Optional[TaskResponseParser[SummarizationTask]]~~ |
|
| `parse_responses` (NEW) | Callable for parsing LLM responses for this task. Defaults to the internal parsing method for this task. ~~Optional[TaskResponseParser[TranslationTask]]~~ |
|
||||||
| `prompt_example_type` (NEW) | Type to use for fewshot examples. Defaults to `SummarizationExample`. ~~Optional[Type[FewshotExample]]~~ |
|
| `prompt_example_type` (NEW) | Type to use for fewshot examples. Defaults to `TranslationExample`. ~~Optional[Type[FewshotExample]]~~ |
|
||||||
| `source_lang` | Language to translate from. Doesn't have to be set. ~~Optional[str]~~ |
|
| `source_lang` | Language to translate from. Doesn't have to be set. ~~Optional[str]~~ |
|
||||||
| `target_lang` | Language to translate to. No default value, has to be set. ~~str~~ |
|
| `target_lang` | Language to translate to. No default value, has to be set. ~~str~~ |
|
||||||
| `field` | Name of extension attribute to store translation in (i. e. the translation will be available in `doc._.{field}`). Defaults to `translation`. ~~str~~ |
|
| `field` | Name of extension attribute to store translation in (i. e. the translation will be available in `doc._.{field}`). Defaults to `translation`. ~~str~~ |
|
||||||
|
|
||||||
To perform [few-shot learning](/usage/large-language-models#few-shot-prompts),
|
To perform [few-shot learning](/usage/large-language-models#few-shot-prompts),
|
||||||
you can write down a few examples in a separate file, and provide these to be
|
you can write down a few examples in a separate file, and provide these to be
|
||||||
|
|
Loading…
Reference in New Issue
Block a user