forked from cognesy/instructor-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkdocs.yml
350 lines (349 loc) · 13.8 KB
/
mkdocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
site_name: Instructor for PHP
site_author: Dariusz Debowczyk
site_description: A lightweight library for structured outputs with LLMs.
repo_name: instructor-php
repo_url: https://github.com/cognesy/instructor-php
site_url: https://cognesy.github.io/instructor-php/
edit_uri: edit/main/docs/
copyright: Copyright © 2024 Dariusz Debowczyk
theme:
name: material
icon:
repo: fontawesome/brands/github
edit: material/pencil
view: material/eye
theme:
admonition:
note: octicons/tag-16
abstract: octicons/checklist-16
info: octicons/info-16
tip: octicons/squirrel-16
success: octicons/check-16
question: octicons/question-16
warning: octicons/alert-16
failure: octicons/x-circle-16
danger: octicons/zap-16
bug: octicons/bug-16
example: octicons/beaker-16
quote: octicons/quote-16
features:
- announce.dismiss
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.code.select
- content.tabs.link
- content.tooltips
- header.autohide
- navigation.expand
- navigation.footer
- navigation.indexes
- navigation.instant
- navigation.instant.prefetch
- navigation.instant.progress
- navigation.prune
- navigation.sections
- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate
palette:
- scheme: default
primary: black
accent: indigo
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: black
accent: indigo
toggle:
icon: material/brightness-4
name: Switch to light mode
font:
text: Roboto
code: Roboto Mono
custom_dir: docs/overrides
# Extensions
markdown_extensions:
- abbr
- admonition
- pymdownx.details
- attr_list
- def_list
- footnotes
- md_in_html
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:material.extensions.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
normalize_issue_symbols: true
repo_url_shorthand: true
user: jxnl
repo: instructor
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.snippets:
auto_append:
- includes/mkdocs.md
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
combine_header_slug: true
- pymdownx.tasklist:
custom_checkbox: true
nav:
- Introduction:
- Welcome To Instructor: 'index.md'
- Why use Instructor?: 'why.md'
- Installation: 'installation.md'
- Usage: 'usage.md'
- Data model and types: 'data_model.md'
- Validation: 'validation.md'
- Extraction modes: 'modes.md'
- Customizing prompts: 'prompts.md'
- Scalars: 'scalars.md'
- Sequences: 'sequences.md'
- Structures: 'structures.md'
- Demonstrations: 'demonstrations.md'
- Partial updates and streaming: 'partials.md'
- LLM model and options: 'model_options.md'
- LLM providers: 'llm_providers.md'
- Contributing: 'contributing.md'
- Help with Instructor: 'help.md'
# - Installation: 'installation.md'
# - Contributing: 'contributing.md'
- Concepts:
- Philosophy: 'concepts/philosophy.md'
- Prompting Tips: 'concepts/prompting.md'
- Search / RAG: 'concepts/search.md'
- Classification: 'concepts/classification.md'
# - Models: 'concepts/models.md'
# - Fields: 'concepts/fields.md'
# - Types: 'concepts/types.md'
# - Validation: "concepts/reask_validation.md"
# - Usage Tokens: 'concepts/usage.md'
# - Missing: "concepts/maybe.md"
# - Patching: 'concepts/patching.md'
# - Retrying: 'concepts/retrying.md'
# - Parallel Tools: 'concepts/parallel.md'
# - Stream Iterable: "concepts/lists.md"
# - Stream Partial: "concepts/partial.md"
# - Raw Response: 'concepts/raw_response.md'
# - FastAPI: 'concepts/fastapi.md'
# - Caching: 'concepts/caching.md'
# - Distillation: "concepts/distillation.md"
# - Union: 'concepts/union.md'
# - Alias: 'concepts/alias.md'
# - Enums: 'concepts/enums.md'
# - Type Adapter: 'concepts/typeadapter.md'
- Internals:
- Overview: 'internals/index.md'
- Instructor class: 'internals/instructor.md'
- Configuration: 'internals/configuration.md'
- Lifecycle: 'internals/lifecycle.md'
- Response models: 'internals/response_models.md'
- Contracts: 'internals/contracts.md'
- Events: 'internals/events.md'
- HTTP: 'internals/http.md'
- Debugging: 'internals/debugging.md'
# - Cookbook:
# - Cookbooks: 'examples/index.md'
# - Text Classification: 'examples/classification.md'
# - Expanding Search Queries (RAG): 'examples/search.md'
# - Batch Classification (User Defined): 'examples/batch_classification.md'
# - LLM Self Critique: 'examples/self_critique.md'
# - Extracting Tables with GPT-V: 'examples/extracting_tables.md'
# - Extracting From Slides with GPT-V: 'examples/extract_slides.md'
# - Content Moderation: 'examples/moderation.md'
# - Citing Sources (RAG): 'examples/exact_citations.md'
# - Extracting Knowledge Graphs: 'examples/knowledge_graph.md'
# - Extracting Complex Entities: 'examples/entity_resolution.md'
# - Query Planning (RAG): 'examples/planning-tasks.md'
# - PII Data Sanitization: 'examples/pii.md'
# - Enabling Open Source Models: 'examples/open_source.md'
# - Image to Ad Copy: 'examples/image_to_ad_copy.md'
# - Ollama: 'examples/ollama.md'
# - SQLModel Integration: 'examples/sqlmodel.md'
- Cookbook:
- Introducing Instructor Hub: 'hub/index.md'
###HUB-INDEX-START###
- Basics:
- Basic use: 'hub/basics/basic.md'
- Basic use with HandlesSelfExtraction trait: 'hub/basics/basic_via_mixin.md'
- Extraction of complex objects: 'hub/basics/complex_object_extraction.md'
- Extraction of complex objects (Anthropic): 'hub/basics/complex_object_extraction_anthropic.md'
- Handling errors with `Maybe` helper class: 'hub/basics/maybe.md'
- Making some fields optional: 'hub/basics/optional_fields.md'
- Private vs public object field: 'hub/basics/private_vs_public_fields.md'
- Automatic correction based on validation results: 'hub/basics/self_correction.md'
- Using attributes: 'hub/basics/using_attributes.md'
- Validation: 'hub/basics/validation.md'
- Validation across multiple fields: 'hub/basics/validation_mixin.md'
- Advanced:
- Caching: 'hub/advanced/caching.md'
- Customize parameters of OpenAI client: 'hub/advanced/custom_client_parameters.md'
- Custom prompts: 'hub/advanced/custom_prompts.md'
- Custom validation using Symfony Validator: 'hub/advanced/custom_validator.md'
- Extracting arguments of function or method: 'hub/advanced/function_arguments.md'
- Language programs: 'hub/advanced/language_programs.md'
- Language programs: 'hub/advanced/language_programs2.md'
- Streaming partial updates during inference: 'hub/advanced/partial_updates.md'
- Providing example inputs and outputs: 'hub/advanced/providing_examples.md'
- Extracting scalar values: 'hub/advanced/scalars.md'
- Extracting sequences of objects: 'hub/advanced/sequences.md'
- Streaming: 'hub/advanced/streaming.md'
- Structures: 'hub/advanced/structures.md'
- Techniques:
- Arbitrary properties: 'hub/techniques/arbitrary_properties.md'
- Consistent values of arbitrary properties: 'hub/techniques/arbitrary_properties_consistency.md'
- Chain of Summaries: 'hub/techniques/chain_of_summaries.md'
- Chain of Thought: 'hub/techniques/chain_of_thought.md'
- Single label classification: 'hub/techniques/classification.md'
- Multiclass classification: 'hub/techniques/classification_multiclass.md'
- Entity relationship extraction: 'hub/techniques/entity_relationships.md'
- Handling errors: 'hub/techniques/handling_errors.md'
- Image to data: 'hub/techniques/image_to_data.md'
- Limiting the length of lists: 'hub/techniques/limiting_length_of_lists.md'
- Restating instructions: 'hub/techniques/restating_instructions.md'
- Ask LLM to rewrite instructions: 'hub/techniques/rewriting_instructions.md'
- Expanding Search Queries: 'hub/techniques/search_criteria.md'
- Reusing components: 'hub/techniques/time_range.md'
- Using CoT to improve interpretation of component data: 'hub/techniques/time_range_with_cot.md'
- Troubleshooting:
- Debugging: 'hub/troubleshooting/debugging.md'
- Handle processing errors: 'hub/troubleshooting/on_error.md'
- Receive specific internal events: 'hub/troubleshooting/on_event.md'
- Receive all internal events with wiretap(): 'hub/troubleshooting/wiretap.md'
- API Support:
- Support for Anthropic API: 'hub/api_support/llm_support_anthropic.md'
- Support for Anyscale API: 'hub/api_support/llm_support_anyscale.md'
- Support for Azure OpenAI API: 'hub/api_support/llm_support_azure_oai.md'
- Support for Cohere API: 'hub/api_support/llm_support_cohere.md'
- Support for Fireworks.ai API: 'hub/api_support/llm_support_fireworks_ai.md'
- Support for Groq API: 'hub/api_support/llm_support_groq.md'
- Support for Mistral API: 'hub/api_support/llm_support_mistral.md'
- Support for local Ollama: 'hub/api_support/llm_support_ollama.md'
- Support for OpenAI API: 'hub/api_support/llm_support_open_ai.md'
- Support for OpenRouter API: 'hub/api_support/llm_support_open_router.md'
- Support for Together.ai API: 'hub/api_support/llm_support_together_ai.md'
###HUB-INDEX-END###
# - Single Classification Model: 'hub/single_classification.md'
# - Multiple Classification Model: 'hub/multiple_classification.md'
# - Extracting Tables using GPT-V: 'hub/tables_from_vision.md'
# - Extract Pandas Dataframes: 'hub/pandas_df.md'
# - Using Ollama: 'hub/ollama.md'
# - Single Classification Model: 'hub/single_classification.md'
# - Multiple Classification Model: 'hub/multiple_classification.md'
# - Extracting Tables using GPT-V: 'hub/tables_from_vision.md'
# - Extract Pandas Dataframes: 'hub/pandas_df.md'
# - Using Ollama: 'hub/ollama.md'
# - Using Llama CPP: 'hub/llama-cpp-python.md'
# - Using Together Compute: 'hub/together.md'
# - Using Anyscale: 'hub/anyscale.md'
# - Batch Async Classification w/ Langsmith: 'hub/batch_classification_langsmith.md'
# - Action Items: 'hub/action_items.md'
# - Partial Streaming: 'hub/partial_streaming.md'
# - Extract Contact Info: 'hub/extract_contact_info.md'
# - Using Mistral Large: 'hub/mistral.md'
# - Tutorials:
# - Tutorials (Notebooks): 'tutorials/1-introduction.ipynb'
# - Tips and Tricks: 'tutorials/2-tips.ipynb'
# - Applications RAG: 'tutorials/3-0-applications-rag.ipynb'
# - Applications RAG - 2: 'tutorials/3-1-validation-rag.ipynb'
# - Validation: 'tutorials/4-validation.ipynb'
# - Knowledge Graphs: 'tutorials/5-knowledge-graphs.ipynb'
# - CLI Reference:
# - "CLI Reference": "cli/index.md"
# - "Finetuning GPT-3.5": "cli/finetune.md"
# - "Usage Tracking": "cli/usage.md"
# - API Reference:
# - 'Core Library': 'api.md'
# - Blog:
# - "blog/index.md"
plugins:
# - mkdocs-jupyter:
# ignore_h1_titles: true
# execute: false
- social
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- minify:
minify_html: true
- mkdocstrings:
handlers:
python:
options:
members_order: alphabetical
allow_inspection: true
show_bases: true
- blog:
enabled: !ENV CI
blog_dir: "blog"
blog_toc: true
post_dir: blog/posts
post_date_format: yyyy/MM/dd
post_url_format: "{date}/{slug}"
authors_file: "{blog}/.authors.yml"
- rss:
match_path: blog/posts/.*
date_from_meta:
as_creation: date
categories:
- categories
- tags
enabled: !ENV [CI, false]
# - redirects:
# redirect_maps:
# 'blog/posts/ollama.md': 'hub/ollama.md'
# 'blob/posts/llama-cpp-python.md': 'hub/llama-cpp-python.md'
# 'blog/posts/together.md': 'hub/together.md'
# 'blog/posts/anyscale.md': 'hub/anyscale.md'
# 'examples/action_items.md': 'hub/action_items.md'
extra:
# analytics:
# provider: google
# property: G-5CR8QXF5CN
# feedback:
# title: Was this page helpful?
# ratings:
# - icon: material/emoticon-happy-outline
# name: This page was helpful
# data: 1
# note: >-
# Thanks for your feedback!
# - icon: material/emoticon-sad-outline
# name: This page could be improved
# data: 0
# note: >-
# Thanks for your feedback! Help us improve this page by
# using our <a href="..." target="_blank" rel="noopener">feedback form</a>.
social:
- icon: fontawesome/brands/twitter
link: https://twitter.com/ddebowczyk
- icon: fontawesome/brands/github
link: https://github.com/cognesy