formatting

This commit is contained in:
svlandeg 2023-09-01 11:23:20 +02:00
parent d08b3ee8f7
commit 1d55de8b44

View File

@ -359,7 +359,7 @@ function.
| [`task.parse_responses`](/api/large-language-models#task-parse-responses) | Takes a collection of LLM responses and the original documents, parses the responses into structured information, and sets the annotations on the documents. | | [`task.parse_responses`](/api/large-language-models#task-parse-responses) | Takes a collection of LLM responses and the original documents, parses the responses into structured information, and sets the annotations on the documents. |
Moreover, the task may define an optional [`scorer` method](/api/scorer#score). Moreover, the task may define an optional [`scorer` method](/api/scorer#score).
It should accept an iterable of `Example`s as input and return a score It should accept an iterable of `Example` objects as input and return a score
dictionary. If the `scorer` method is defined, `spacy-llm` will call it to dictionary. If the `scorer` method is defined, `spacy-llm` will call it to
evaluate the component. evaluate the component.
@ -469,7 +469,7 @@ provider's documentation.
</Infobox> </Infobox>
| Component | Description | | Model | Description |
| ----------------------------------------------------------------------- | ---------------------------------------------- | | ----------------------------------------------------------------------- | ---------------------------------------------- |
| [`spacy.GPT-4.v1`](/api/large-language-models#models-rest) | OpenAIs `gpt-4` model family. | | [`spacy.GPT-4.v1`](/api/large-language-models#models-rest) | OpenAIs `gpt-4` model family. |
| [`spacy.GPT-3-5.v1`](/api/large-language-models#models-rest) | OpenAIs `gpt-3-5` model family. | | [`spacy.GPT-3-5.v1`](/api/large-language-models#models-rest) | OpenAIs `gpt-3-5` model family. |
@ -512,7 +512,7 @@ documents at each run that keeps batches of documents stored on disk.
### Various functions {id="various-functions"} ### Various functions {id="various-functions"}
| Component | Description | | Function | Description |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`spacy.FewShotReader.v1`](/api/large-language-models#fewshotreader-v1) | This function is registered in spaCy's `misc` registry, and reads in examples from a `.yml`, `.yaml`, `.json` or `.jsonl` file. It uses [`srsly`](https://github.com/explosion/srsly) to read in these files and parses them depending on the file extension. | | [`spacy.FewShotReader.v1`](/api/large-language-models#fewshotreader-v1) | This function is registered in spaCy's `misc` registry, and reads in examples from a `.yml`, `.yaml`, `.json` or `.jsonl` file. It uses [`srsly`](https://github.com/explosion/srsly) to read in these files and parses them depending on the file extension. |
| [`spacy.FileReader.v1`](/api/large-language-models#filereader-v1) | This function is registered in spaCy's `misc` registry, and reads a file provided to the `path` to return a `str` representation of its contents. This function is typically used to read [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) files containing the prompt template. | | [`spacy.FileReader.v1`](/api/large-language-models#filereader-v1) | This function is registered in spaCy's `misc` registry, and reads a file provided to the `path` to return a `str` representation of its contents. This function is typically used to read [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) files containing the prompt template. |