From e6d49217caacea10e7379f32624c73febacbd384 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:13:16 +0000 Subject: [PATCH] docs: remove troubleshooting sections from integration docs, update titles and add redirect maps - Remove troubleshooting sections from all integration docs - Remove 'Structured outputs with' prefix from navigation titles - Add redirect maps for moved documentation pages - Clean up documentation structure --- docs/integrations/anthropic.md | 8 --- docs/integrations/anyscale.md | 28 ---------- docs/integrations/cerebras.md | 9 ---- docs/integrations/cohere.md | 8 --- docs/integrations/fireworks.md | 26 --------- docs/integrations/google.md | 8 --- docs/integrations/litellm.md | 9 ---- docs/integrations/llama-cpp-python.md | 22 -------- docs/integrations/mistral.md | 8 --- docs/integrations/ollama.md | 76 ++------------------------- docs/integrations/openai.md | 28 ---------- docs/integrations/vertex.md | 8 --- mkdocs.yml | 44 ++++++++++------ 13 files changed, 32 insertions(+), 250 deletions(-) diff --git a/docs/integrations/anthropic.md b/docs/integrations/anthropic.md index 9741a8ed2..a11552c52 100644 --- a/docs/integrations/anthropic.md +++ b/docs/integrations/anthropic.md @@ -246,14 +246,6 @@ Anthropic offers several Claude models: - Complex Reasoning Tasks - Multi-step Processing -## Troubleshooting - -Common issues and solutions: -1. API Authentication -2. Rate Limiting -3. Context Length -4. Response Validation - ## Related Resources - [Anthropic API Documentation](https://docs.anthropic.com/) diff --git a/docs/integrations/anyscale.md b/docs/integrations/anyscale.md index ad6d47332..16d511782 100644 --- a/docs/integrations/anyscale.md +++ b/docs/integrations/anyscale.md @@ -279,34 +279,6 @@ Anyscale provides access to various open-source models: - API Response Formatting - Configuration Generation -## Troubleshooting - -Common issues and solutions: - -### 1. API Key Issues -- **Missing API Key**: Ensure `ANYSCALE_API_KEY` environment variable is set -- **Invalid API Key**: Verify the key is valid and has not expired -- **Permission Issues**: Check if your API key has access to the required models -- **Rate Limiting**: Monitor your API usage and implement proper rate limiting - -### 2. Streaming Issues -- **Connection Timeouts**: Implement proper timeout handling -- **Partial Response Errors**: Handle incomplete responses gracefully -- **Memory Issues**: Monitor memory usage with large streaming responses -- **Rate Limits**: Implement backoff strategies for streaming requests - -### 3. Model-Specific Issues -- **Model Access**: Ensure your account has access to required models -- **Context Length**: Monitor and handle context length limits -- **Token Usage**: Track token usage to avoid quota issues -- **Response Format**: Handle model-specific response formats - -### 4. Integration Issues -- **Version Compatibility**: Keep OpenAI and Instructor versions in sync -- **Type Validation**: Handle validation errors with proper retry logic -- **Schema Complexity**: Simplify complex schemas if needed -- **Async/Sync Usage**: Use appropriate client for your use case - ## Related Resources - [Anyscale Endpoints Documentation](https://docs.endpoints.anyscale.com/) diff --git a/docs/integrations/cerebras.md b/docs/integrations/cerebras.md index 67915b55e..cc5f585cf 100644 --- a/docs/integrations/cerebras.md +++ b/docs/integrations/cerebras.md @@ -201,7 +201,6 @@ Cerebras offers several model options: - Monitor model responses - Use appropriate timeout settings - ## Common Use Cases - High-Performance Computing @@ -210,14 +209,6 @@ Cerebras offers several model options: - Research Applications - Batch Processing -## Troubleshooting - -Common issues and solutions: -1. Hardware Configuration -2. Resource Management -3. Response Validation -4. Performance Optimization - ## Related Resources - [Cerebras Documentation](https://docs.cerebras.ai/) diff --git a/docs/integrations/cohere.md b/docs/integrations/cohere.md index 3482f53a9..5dc87fe59 100644 --- a/docs/integrations/cohere.md +++ b/docs/integrations/cohere.md @@ -209,14 +209,6 @@ Cohere offers several model options: - Semantic Search Integration - Classification Tasks -## Troubleshooting - -Common issues and solutions: -1. API Authentication -2. Rate Limiting -3. Response Validation -4. Model Selection - ## Related Resources - [Cohere API Documentation](https://docs.cohere.com/) diff --git a/docs/integrations/fireworks.md b/docs/integrations/fireworks.md index 0b683f5ee..b470a3d01 100644 --- a/docs/integrations/fireworks.md +++ b/docs/integrations/fireworks.md @@ -259,32 +259,6 @@ Fireworks offers several model options: - Research Applications - Production Deployments -## Troubleshooting - -Common issues and solutions: -1. API Authentication -2. Model Selection -3. Response Validation -4. Performance Optimization -5. Streaming Issues - -### Streaming-Specific Troubleshooting - -1. **Connection Issues** - - Implement proper retry logic - - Use appropriate timeouts - - Monitor connection stability - -2. **Model Compatibility** - - Verify model streaming support - - Test with smaller payloads first - - Monitor response patterns - -3. **Performance Issues** - - Implement proper error handling - - Use appropriate batch sizes - - Monitor system resources - ## Related Resources - [Fireworks Documentation](https://docs.fireworks.ai/) diff --git a/docs/integrations/google.md b/docs/integrations/google.md index 00f200301..6df5d9a97 100644 --- a/docs/integrations/google.md +++ b/docs/integrations/google.md @@ -234,14 +234,6 @@ Google offers several Gemini models: - Multimodal Processing - Complex Reasoning Tasks -## Troubleshooting - -Common issues and solutions: -1. API Authentication -2. Quota Management -3. Response Validation -4. Model Availability - ## Related Resources - [Google AI Documentation](https://ai.google.dev/) diff --git a/docs/integrations/litellm.md b/docs/integrations/litellm.md index 6b4c48d71..e15152d26 100644 --- a/docs/integrations/litellm.md +++ b/docs/integrations/litellm.md @@ -273,15 +273,6 @@ LiteLLM supports multiple providers: - Cross-Provider Testing - Unified API Integration -## Troubleshooting - -Common issues and solutions: -1. Provider Authentication -2. Model Availability -3. Provider-Specific Errors -4. Rate Limiting -5. Streaming Compatibility - ## Related Resources - [LiteLLM Documentation](https://docs.litellm.ai/) diff --git a/docs/integrations/llama-cpp-python.md b/docs/integrations/llama-cpp-python.md index 06bdb2a41..d96ead636 100644 --- a/docs/integrations/llama-cpp-python.md +++ b/docs/integrations/llama-cpp-python.md @@ -232,28 +232,6 @@ client = patch( - Offline Processing - Resource-Constrained Environments -## Troubleshooting - -Common issues and solutions: - -1. **Slow Inference** - - Reduce context window size - - Use smaller model variants - - Implement appropriate timeouts - - Consider alternative clients for production use - -2. **Memory Issues** - - Reduce batch size - - Use quantized models - - Monitor and limit concurrent requests - - Implement proper cleanup - -3. **Extraction Failures** - - Verify prompt format - - Check context window limits - - Implement retry logic - - Use simpler model responses - ## Related Resources - [llama-cpp-python Documentation](https://llama-cpp-python.readthedocs.io/) diff --git a/docs/integrations/mistral.md b/docs/integrations/mistral.md index c0cee84aa..a516ce5e0 100644 --- a/docs/integrations/mistral.md +++ b/docs/integrations/mistral.md @@ -222,14 +222,6 @@ Mistral AI provides several powerful models: - Document Analysis - Configuration Generation -## Troubleshooting - -Common issues and solutions: -1. Model Loading Issues -2. Memory Management -3. Response Validation -4. API Rate Limits - ## Related Resources - [Mistral AI Documentation](https://docs.mistral.ai/) diff --git a/docs/integrations/ollama.md b/docs/integrations/ollama.md index 46ac04936..e50681550 100644 --- a/docs/integrations/ollama.md +++ b/docs/integrations/ollama.md @@ -269,78 +269,6 @@ Ollama supports various models: - Rapid Prototyping - Edge Computing -## Troubleshooting - -Common issues and solutions: - -### 1. Connection Issues -- **Server Not Running**: Ensure Ollama server is running (`ollama serve`) -- **Wrong Endpoint**: Verify base URL is correct (`http://localhost:11434/v1`) -- **Port Conflicts**: Check if port 11434 is available -- **Network Issues**: Verify local network connectivity - -### 2. Function Calling Errors -- **Error**: "llama2 does not support tools" -- **Solution**: Use JSON mode instead of tools mode -```python -# Correct way to initialize client -client = instructor.patch(client, mode=instructor.Mode.JSON) -``` - -### 3. Streaming Issues -- **Error**: "create_partial not available" -- **Solution**: Use batch processing approach -```python -# Instead of streaming, break down into smaller requests -initial_response = client.chat.completions.create( - model="llama2", - messages=[{"role": "user", "content": "First part of request"}], - response_model=YourModel -) -``` - -### 4. Model Loading Issues -- **Model Not Found**: Run `ollama pull model_name` -- **Memory Issues**: - - Error: "model requires more system memory than available" - - Solutions: - 1. Use a quantized model (recommended for < 8GB RAM): - ```bash - # Pull a smaller, quantized model - ollama pull mistral-7b-instruct-v0.2-q4 - ``` - 2. Free up system memory: - - Close unnecessary applications - - Monitor memory usage with `free -h` - - Consider increasing swap space -- **GPU Issues**: Verify CUDA configuration -```bash -# Check available models -ollama list -# Pull specific model -ollama pull mistral-7b-instruct-v0.2-q4 # Smaller, quantized model -``` - -### 5. Response Validation -- **Invalid JSON**: Ensure proper prompt formatting -- **Schema Mismatch**: Verify model output matches expected schema -- **Retry Logic**: Implement proper error handling -```python -try: - response = client.chat.completions.create( - model="llama2", - messages=[{"role": "user", "content": "Your prompt"}], - response_model=YourModel - ) -except Exception as e: - if "connection refused" in str(e).lower(): - print("Error: Ollama server not running") - elif "model not found" in str(e).lower(): - print("Error: Model not available. Run 'ollama pull model_name'") - else: - print(f"Unexpected error: {str(e)}") -``` - ## Related Resources - [Ollama Documentation](https://ollama.ai/docs) @@ -350,4 +278,6 @@ except Exception as e: ## Updates and Compatibility -Instructor maintains compatibility with Ollama's OpenAI-compatible endpoints. Check the [changelog](../../CHANGELOG.md) for updates. Note that some Instructor features may not be available due to Ollama's API limitations. +Instructor maintains compatibility with Ollama's latest releases. Check the [changelog](../../CHANGELOG.md) for updates. + +Note: Always verify model-specific features and limitations before implementation. diff --git a/docs/integrations/openai.md b/docs/integrations/openai.md index 24d73c05a..78b0cdf2d 100644 --- a/docs/integrations/openai.md +++ b/docs/integrations/openai.md @@ -272,34 +272,6 @@ client = instructor.patch( - Document Analysis - Configuration Generation -## Troubleshooting - -Common issues and solutions: - -### 1. API Key Issues -- **Missing API Key**: Ensure `OPENAI_API_KEY` environment variable is set -- **Invalid API Key**: Verify the key is valid and has not expired -- **Permission Issues**: Check if your API key has access to the required models -- **Rate Limiting**: Monitor your API usage and implement proper rate limiting - -### 2. Streaming Issues -- **Connection Timeouts**: Implement proper timeout handling -- **Partial Response Errors**: Handle incomplete responses gracefully -- **Memory Issues**: Monitor memory usage with large streaming responses -- **Rate Limits**: Implement backoff strategies for streaming requests - -### 3. Model-Specific Issues -- **Model Access**: Ensure your account has access to required models -- **Context Length**: Monitor and handle context length limits -- **Token Usage**: Track token usage to avoid quota issues -- **Response Format**: Handle model-specific response formats - -### 4. Integration Issues -- **Version Compatibility**: Keep OpenAI and Instructor versions in sync -- **Type Validation**: Handle validation errors with proper retry logic -- **Schema Complexity**: Simplify complex schemas if needed -- **Async/Sync Usage**: Use appropriate client for your use case - ## Related Resources - [OpenAI Documentation](https://platform.openai.com/docs) diff --git a/docs/integrations/vertex.md b/docs/integrations/vertex.md index 9a30e2738..f150cd2f8 100644 --- a/docs/integrations/vertex.md +++ b/docs/integrations/vertex.md @@ -212,14 +212,6 @@ Vertex AI offers several model options: - Compliance-Aware Processing - Large-Scale Deployments -## Troubleshooting - -Common issues and solutions: -1. Authentication Setup -2. Project Configuration -3. Quota Management -4. Response Validation - ## Related Resources - [Vertex AI Documentation](https://cloud.google.com/vertex-ai/docs) diff --git a/mkdocs.yml b/mkdocs.yml index e03ebc8fa..7b3dab981 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -202,20 +202,20 @@ nav: - Extracting Relevant Clips from YouTube Videos: "hub/youtube_clips.md" - Building Knowledge Graphs with Structured Outputs: 'tutorials/5-knowledge-graphs.ipynb' - Integrations: - - Structured outputs with Anyscale: 'integrations/anyscale.md' - - Structured outputs with Anthropic: 'integrations/anthropic.md' - - Structured outputs with Cerebras: 'integrations/cerebras.md' - - Structured outputs with Cohere: 'integrations/cohere.md' - - Structured outputs with Fireworks: 'integrations/fireworks.md' - - Structured outputs with Google: 'integrations/google.md' - - Structured outputs with Groq: 'integrations/groq.md' - - Structured outputs with LiteLLM: 'integrations/litellm.md' - - Structured outputs with llama-cpp-python: 'integrations/llama-cpp-python.md' - - Structured outputs with Mistral: 'integrations/mistral.md' - - Structured outputs with Ollama: 'integrations/ollama.md' - - Structured outputs with OpenAI: 'integrations/openai.md' - - Structured outputs with Together: 'integrations/together.md' - - Structured outputs with Vertex AI: 'integrations/vertexai.md' + - Anyscale: 'integrations/anyscale.md' + - Anthropic: 'integrations/anthropic.md' + - Cerebras: 'integrations/cerebras.md' + - Cohere: 'integrations/cohere.md' + - Fireworks: 'integrations/fireworks.md' + - Google: 'integrations/google.md' + - Groq: 'integrations/groq.md' + - LiteLLM: 'integrations/litellm.md' + - llama-cpp-python: 'integrations/llama-cpp-python.md' + - Mistral: 'integrations/mistral.md' + - Ollama: 'integrations/ollama.md' + - OpenAI: 'integrations/openai.md' + - Together: 'integrations/together.md' + - Vertex AI: 'integrations/vertexai.md' - CLI Reference: - "CLI Reference": "cli/index.md" - "Finetuning GPT-3.5": "cli/finetune.md" @@ -293,12 +293,26 @@ plugins: - redirects: redirect_maps: jobs.md: https://jobs.applied-llms.org/ + 'hub/clients/vertexai.md': 'integrations/vertexai.md' + 'hub/clients/ollama.md': 'integrations/ollama.md' + 'hub/clients/openai.md': 'integrations/openai.md' + 'hub/clients/anthropic.md': 'integrations/anthropic.md' + 'hub/clients/anyscale.md': 'integrations/anyscale.md' + 'hub/clients/cohere.md': 'integrations/cohere.md' + 'hub/clients/fireworks.md': 'integrations/fireworks.md' + 'hub/clients/google.md': 'integrations/google.md' + 'hub/clients/litellm.md': 'integrations/litellm.md' + 'hub/clients/llama-cpp-python.md': 'integrations/llama-cpp-python.md' + 'hub/clients/mistral.md': 'integrations/mistral.md' + 'hub/clients/cerebras.md': 'integrations/cerebras.md' + 'hub/clients/groq.md': 'integrations/groq.md' + 'hub/clients/together.md': 'integrations/together.md' - mkdocs-jupyter: ignore_h1_titles: true execute: false - social - search: - separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' + separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\b)(?=[A-Z][a-z])' - minify: minify_html: true - mkdocstrings: