Skip to content

Commit

Permalink
doc: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Mar 8, 2024
1 parent d3e6f11 commit 405ba5a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 16 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 13 additions & 4 deletions instructor/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
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")

0 comments on commit 405ba5a

Please sign in to comment.