Skip to content

Commit

Permalink
docs: remove troubleshooting sections from integration docs, update t…
Browse files Browse the repository at this point in the history
…itles 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
  • Loading branch information
devin-ai-integration[bot] committed Nov 17, 2024
1 parent 9450453 commit e6d4921
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 250 deletions.
8 changes: 0 additions & 8 deletions docs/integrations/anthropic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
28 changes: 0 additions & 28 deletions docs/integrations/anyscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
9 changes: 0 additions & 9 deletions docs/integrations/cerebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ Cerebras offers several model options:
- Monitor model responses
- Use appropriate timeout settings


## Common Use Cases

- High-Performance Computing
Expand All @@ -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/)
Expand Down
8 changes: 0 additions & 8 deletions docs/integrations/cohere.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
26 changes: 0 additions & 26 deletions docs/integrations/fireworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
8 changes: 0 additions & 8 deletions docs/integrations/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
9 changes: 0 additions & 9 deletions docs/integrations/litellm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
22 changes: 0 additions & 22 deletions docs/integrations/llama-cpp-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
8 changes: 0 additions & 8 deletions docs/integrations/mistral.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
76 changes: 3 additions & 73 deletions docs/integrations/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
28 changes: 0 additions & 28 deletions docs/integrations/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions docs/integrations/vertex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
44 changes: 29 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit e6d4921

Please sign in to comment.