Skip to content

Commit

Permalink
refactor: remove instructor-hub and add redirects
Browse files Browse the repository at this point in the history
- Removed instructor-hub-proxy directory
- Added redirects for hub documentation to examples
- Updated documentation links to point to new locations
- Added deprecated hub CLI command with error message
  • Loading branch information
devin-ai-integration[bot] committed Nov 19, 2024
1 parent a0c57eb commit a03e894
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 2,084 deletions.
4 changes: 2 additions & 2 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ If you want to get updates on new features and tips on how to use Instructor, yo
- [Ollama Integration](../integrations/ollama.md)
- [llama-cpp-python Integration](../integrations/llama-cpp-python.md)
- [Together Compute Integration](../integrations/together.md)
- [Extracting Data into Pandas DataFrame using GPT-3.5 Turbo](../hub/pandas_df.md)
- [Implementing Streaming Partial Responses with Field-Level Streaming](../hub/partial_streaming.md)
- [Pandas DataFrame Examples](../examples/bulk_classification.md#working-with-dataframes)
- [Streaming Response Examples](../examples/bulk_classification.md#streaming-responses)

## Media and Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/posts/best_framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Other features on instructor, in and out of the llibrary are:
3. [Parallel Tool Calling](../../concepts/parallel.md) with correct types
4. Streaming [Partial](../../concepts/partial.md) and [Iterable](../../concepts/iterable.md) data.
5. Returning [Primitive](../../concepts/types.md) Types and [Unions](../../concepts/unions.md) as well!
6. Lots, and Lots of [Cookbooks](../../examples/index.md), [Tutorials](../../tutorials/1-introduction.ipynb), Documentation and even [instructor hub](../../integrations/index.md)
6. Lots of [Cookbooks](../../examples/index.md), [Tutorials](../../tutorials/1-introduction.ipynb), and comprehensive Documentation in our [Integration Guides](../../integrations/index.md)

## Instructor's Broad Applicability

Expand Down
7 changes: 4 additions & 3 deletions docs/blog/posts/langsmith.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ pip install -U langsmith
pip install -U instructor
```

If you want to pull this example down from [instructor-hub](../../hub/index.md) you can use the following command:
You can find this example in our [examples directory](../../examples/bulk_classification.md):

```bash
instructor hub pull --slug batch_classification_langsmith --py > batch_classification_langsmith.py
# The example code is available in the examples directory
# See: https://python.useinstructor.com/examples/bulk_classification
```

In this example we'll use the `wrap_openai` function to wrap the OpenAI client with LangSmith. This will allow us to use LangSmith's observability and monitoring features with the OpenAI client. Then we'll use `instructor` to patch the client with the `TOOLS` mode. This will allow us to use `instructor` to add additional functionality to the client. We'll use [asyncio](./learn-async.md) to classify a list of questions.
Expand Down Expand Up @@ -169,4 +170,4 @@ If you follow what we've done is wrapped the client and proceeded to quickly use

To take a look at trace of this run check out this shareable [link](https://smith.langchain.com/public/eaae9f95-3779-4bbb-824d-97aa8a57a4e0/r).

![](./img/langsmith.png)
![](./img/langsmith.png)
2 changes: 1 addition & 1 deletion docs/examples/classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn to implement single-label and multi-label text classification

# Text Classification using OpenAI and Pydantic

This tutorial showcases how to implement text classification tasks—specifically, single-label and multi-label classifications—using the OpenAI API and Pydantic models. If you want to see full examples check out the hub examples for [single classification](../hub/single_classification.md) and [multi classification](../hub/multiple_classification.md)
This tutorial showcases how to implement text classification tasks—specifically, single-label and multi-label classifications—using the OpenAI API and Pydantic models. For complete examples, check out our [single classification](bulk_classification.md#single-label-classification) and [multi-label classification](bulk_classification.md#multi-label-classification) examples in the cookbook.

!!! tips "Motivation"

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Welcome to our collection of cookbooks showcasing the power of structured output
7. [Complex Query Decomposition](planning-tasks.md): Break down intricate queries into manageable subtasks for thorough analysis.
8. [Entity Extraction and Resolution](entity_resolution.md): Identify and disambiguate named entities in text.
9. [PII Sanitization](pii.md): Detect and redact sensitive personal information from text data.
10. [Action Item and Dependency Extraction](../hub/action_items.md): Generate structured task lists and relationships from meeting transcripts.
10. [Action Item Extraction](planning-tasks.md): Generate structured task lists and relationships from meeting transcripts.
11. [OpenAI Content Moderation Integration](moderation.md): Implement content filtering using OpenAI's moderation API.
12. [Table Extraction with GPT-Vision](extracting_tables.md): Convert image-based tables into structured data using AI vision capabilities.
13. [AI-Powered Ad Copy Generation from Images](image_to_ad_copy.md): Create compelling advertising text based on visual content.
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Instructor offers several key benefits:

- :material-code-braces: **Powered by Type Hints**: Leverage Pydantic for schema validation, prompting control, less code, and IDE integration. [:octicons-arrow-right-16: Learn more](https://docs.pydantic.dev/)

- :material-lightning-bolt: **Simplified LLM Interactions**: Support for various LLM providers including OpenAI, Anthropic, Google, Vertex AI, Mistral/Mixtral, Anyscale, Ollama, llama-cpp-python, Cohere, and LiteLLM. [:octicons-arrow-right-16: See Hub](../hub/index.md)
- :material-lightning-bolt: **Simplified LLM Interactions**: Support for various LLM providers including OpenAI, Anthropic, Google, Vertex AI, Mistral/Mixtral, Anyscale, Ollama, llama-cpp-python, Cohere, and LiteLLM. [:octicons-arrow-right-16: See Examples](../examples/index.md)

For more details on these features, check out the [Concepts](../concepts/models.md) section of the documentation.

Expand Down Expand Up @@ -107,10 +107,10 @@ To explore more about Instructor and its various applications, consider checking

2. [Concepts](../concepts/models.md) - Dive deeper into the core concepts of Instructor, including models, retrying, and validation.

3. [Hub](../hub/index.md) - Explore the Instructor Hub for more examples and integrations with various LLM providers.
3. [Examples](../examples/index.md) - Explore our comprehensive collection of examples and integrations with various LLM providers.

4. [Tutorials](../tutorials/1-introduction.ipynb) - Step-by-step tutorials to help you get started with Instructor.

5. [Learn Prompting](../prompting/index.md) - Techniques and strategies for effective prompt engineering with Instructor.

By exploring these resources, you'll gain a comprehensive understanding of Instructor's capabilities and how to leverage them in your projects.
By exploring these resources, you'll gain a comprehensive understanding of Instructor's capabilities and how to leverage them in your projects.
6 changes: 1 addition & 5 deletions docs/integrations/cohere.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ description: Learn how to leverage Cohere's command models with Python's instruc

# Structured outputs with Cohere, a complete guide w/ instructor

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug cohere --py > cohere_example.py
```
This guide demonstrates how to use Cohere with Instructor to generate structured outputs. You'll learn how to use Cohere's command models to create type-safe responses.

You can now use any of the Cohere's [command models](https://docs.cohere.com/docs/models) with the `instructor` library to get structured outputs.

Expand Down
6 changes: 1 addition & 5 deletions docs/integrations/groq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ description: Learn how to use Groq AI for structured outputs with Pydantic in Py

# Structured Outputs with Groq AI

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug groq --py > groq_example.py
```
This guide demonstrates how to use Groq AI with Instructor to generate structured outputs. You'll learn how to use Groq's LLM models to create type-safe responses.

you'll need to sign up for an account and get an API key. You can do that [here](https://console.groq.com/docs/quickstart).

Expand Down
6 changes: 1 addition & 5 deletions docs/integrations/llama-cpp-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ authors:

# Structured outputs with llama-cpp-python, a complete guide w/ instructor

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug llama-cpp-python --py > llama_cpp_python_example.py
```
This guide demonstrates how to use llama-cpp-python with Instructor to generate structured outputs. You'll learn how to use JSON schema mode and speculative decoding to create type-safe responses from local LLMs.

Open-source LLMS are gaining popularity, and llama-cpp-python has made the `llama-cpp` model available to obtain structured outputs using JSON schema via a mixture of [constrained sampling](https://llama-cpp-python.readthedocs.io/en/latest/#json-schema-mode) and [speculative decoding](https://llama-cpp-python.readthedocs.io/en/latest/#speculative-decoding).

Expand Down
6 changes: 1 addition & 5 deletions docs/integrations/mistral.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ authors:

# Structured outputs with Mistral, a complete guide w/ instructor

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug mistral --py > mistral_example.py
```
This guide demonstrates how to use Mistral with Instructor to generate structured outputs. You'll learn how to use function calling with Mistral Large to create type-safe responses.

Mistral Large is the flagship model from Mistral AI, supporting 32k context windows and functional calling abilities. Mistral Large's addition of [function calling](https://docs.mistral.ai/guides/function-calling/) makes it possible to obtain structured outputs using JSON schema.

Expand Down
6 changes: 1 addition & 5 deletions docs/integrations/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ authors:

# Structured outputs with Ollama, a complete guide w/ instructor

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug ollama --py > ollama_example.py
```
This guide demonstrates how to use Ollama with Instructor to generate structured outputs. You'll learn how to use JSON schema mode with local LLMs to create type-safe responses.

Open-source LLMS are gaining popularity, and the release of Ollama's OpenAI compatibility later it has made it possible to obtain structured outputs using JSON schema.

Expand Down
6 changes: 1 addition & 5 deletions docs/integrations/together.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ authors:

# Structured outputs with Together AI, a complete guide w/ instructor

If you want to try this example using `instructor hub`, you can pull it by running

```bash
instructor hub pull --slug together --py > together_example.py
```
This guide demonstrates how to use Together AI with Instructor to generate structured outputs. You'll learn how to use function calling with Together's models to create type-safe responses.

Open-source LLMS are gaining popularity, and with the release of Together's Function calling models, its been easier than ever to get structured outputs.

Expand Down
13 changes: 0 additions & 13 deletions instructor-hub-proxy/.editorconfig

This file was deleted.

172 changes: 0 additions & 172 deletions instructor-hub-proxy/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions instructor-hub-proxy/.prettierrc

This file was deleted.

10 changes: 0 additions & 10 deletions instructor-hub-proxy/create.sql

This file was deleted.

Loading

0 comments on commit a03e894

Please sign in to comment.