mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-27 08:29:51 +03:00
fix construction example
This commit is contained in:
parent
def7013eec
commit
8d160ecbae
|
@ -33,12 +33,12 @@ as well as through task-specific component factories:
|
||||||
> #### Example
|
> #### Example
|
||||||
>
|
>
|
||||||
> ```python
|
> ```python
|
||||||
> # Construction via add_pipe with default GPT3.5 model and NER task
|
> # Construction via add_pipe with the default GPT3.5 model and an explicitly defined task
|
||||||
> config = {"task": {"@llm_tasks": "spacy.NER.v3", "labels": ["PERSON", "ORGANISATION", "LOCATION"]}}
|
> config = {"task": {"@llm_tasks": "spacy.NER.v3", "labels": ["PERSON", "ORGANISATION", "LOCATION"]}}
|
||||||
> llm = nlp.add_pipe("llm")
|
> llm = nlp.add_pipe("llm", config=config)
|
||||||
>
|
>
|
||||||
> # Construction via add_pipe with task-specific factory and default GPT3.5 model
|
> # Construction via add_pipe with task-specific factory and default GPT3.5 model
|
||||||
> parser = nlp.add_pipe("llm-ner", config=config)
|
> llm = nlp.add_pipe("llm-ner")
|
||||||
>
|
>
|
||||||
> # Construction from class
|
> # Construction from class
|
||||||
> from spacy_llm.pipeline import LLMWrapper
|
> from spacy_llm.pipeline import LLMWrapper
|
||||||
|
|
Loading…
Reference in New Issue
Block a user