mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
doc: add docs
This commit is contained in:
@@ -26,7 +26,15 @@ Including but not limited to:
|
||||
|
||||
## Get Started in Moments
|
||||
|
||||
Installing Instructor is a breeze. Simply run `pip install instructor` in your terminal and you're on your way to a smoother data handling experience!
|
||||
```
|
||||
pip install -U instructor
|
||||
```
|
||||
|
||||
If you ever get stuck, you can always run `instructor docs` to open the documentation in your browser. It even supports searching for specific topics.
|
||||
|
||||
```
|
||||
instructor docs [QUERY]
|
||||
```
|
||||
|
||||
## How Instructor Enhances Your Workflow
|
||||
|
||||
|
||||
+16
-1
@@ -12,7 +12,22 @@ Instructor makes it easy to reliably get structured data like JSON from Large La
|
||||
|
||||
By leveraging various modes like Function Calling, Tool Calling and even constrained sampling modes like JSON mode, JSON Schema; Instructor stands out for its simplicity, transparency, and user-centric design. We leverage Pydantic to do the heavy lifting, and we've built a simple, easy-to-use API on top of it by helping you manage [validation context](./concepts/reask_validation.md), retries with [Tenacity](./concepts/retrying.md), and streaming [Lists](./concepts/lists.md) and [Partial](./concepts/partial.md) responses.
|
||||
|
||||
We also provide library in [Typescript](https://instructor-ai.github.io/instructor-js/), [Elixir](https://github.com/thmsmlr/instructor_ex/) and [PHP](https://github.com/cognesy/instructor-php/).
|
||||
|
||||
We also provide a library in [Typescript](https://instructor-ai.github.io/instructor-js/), [Elixir](https://github.com/thmsmlr/instructor_ex/) and [PHP](https://github.com/cognesy/instructor-php/).
|
||||
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
```
|
||||
pip install -U instructor
|
||||
```
|
||||
|
||||
If you ever get stuck, you can always run `instructor docs` to open the documentation in your browser. It even supports searching for specific topics.
|
||||
|
||||
```
|
||||
instructor docs [QUERY]
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
+13
-4
@@ -4,12 +4,21 @@ import instructor.cli.files as files
|
||||
import instructor.cli.usage as usage
|
||||
import instructor.cli.hub as hub
|
||||
|
||||
app = typer.Typer(
|
||||
name="instructor-ft",
|
||||
help="A CLI for fine-tuning OpenAI's models",
|
||||
)
|
||||
app = typer.Typer()
|
||||
|
||||
app.add_typer(jobs.app, name="jobs", help="Monitor and create fine tuning jobs")
|
||||
app.add_typer(files.app, name="files", help="Manage files on OpenAI's servers")
|
||||
app.add_typer(usage.app, name="usage", help="Check OpenAI API usage data")
|
||||
app.add_typer(hub.app, name="hub", help="Interact with the instructor hub")
|
||||
|
||||
|
||||
@app.command()
|
||||
def docs(query: str = typer.Argument(None, help="Search the documentation")):
|
||||
"""
|
||||
Open the instructor documentation website.
|
||||
"""
|
||||
if query:
|
||||
typer.launch(f"https://jxnl.github.io/instructor/?q={query}")
|
||||
else:
|
||||
typer.launch("https://jxnl.github.io/instructor")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user