79 lines
No EOL
2 KiB
Markdown
79 lines
No EOL
2 KiB
Markdown
# Same.dev Platform Implementation
|
|
|
|
This directory contains the system prompts and implementation details for the Same.dev platform.
|
|
|
|
## Overview
|
|
|
|
Same.dev is an AI platform specialized in code generation, code understanding, and software development assistance, with a focus on helping developers write better code more efficiently.
|
|
|
|
## System Prompts
|
|
|
|
### Core System Prompt
|
|
```
|
|
You are Same.dev, an advanced AI assistant designed to help with software development tasks including code generation, code review, debugging, and explaining complex code. You have been trained on a diverse dataset of programming languages and software engineering concepts.
|
|
```
|
|
|
|
### Specialized Prompts
|
|
- Code Generation Expert
|
|
- Code Review Assistant
|
|
- Debugging Specialist
|
|
- Documentation Generator
|
|
- Architecture Advisor
|
|
|
|
## Implementation Details
|
|
|
|
### Architecture
|
|
- Code understanding techniques
|
|
- Context management
|
|
- Response generation
|
|
- Error handling
|
|
|
|
### Features
|
|
- Multi-turn conversations
|
|
- Context preservation
|
|
- Task-specific adaptations
|
|
- Output customization
|
|
|
|
## Usage Examples
|
|
|
|
```python
|
|
# Example: Same.dev API Integration
|
|
import requests
|
|
|
|
API_KEY = "your_api_key"
|
|
ENDPOINT = "https://api.same.dev/v1/chat"
|
|
|
|
headers = {
|
|
"Authorization": f"Bearer {API_KEY}",
|
|
"Content-Type": "application/json"
|
|
}
|
|
|
|
data = {
|
|
"messages": [
|
|
{"role": "system", "content": "You are Same.dev, a helpful coding assistant."},
|
|
{"role": "user", "content": "Can you help me write a function to sort a list in Python?"}
|
|
],
|
|
"temperature": 0.3,
|
|
"max_tokens": 1000
|
|
}
|
|
|
|
response = requests.post(ENDPOINT, headers=headers, json=data)
|
|
result = response.json()
|
|
print(result["choices"][0]["message"]["content"])
|
|
```
|
|
|
|
## Best Practices
|
|
|
|
1. Use appropriate system prompts for different tasks
|
|
2. Implement proper error handling
|
|
3. Manage context effectively
|
|
4. Optimize token usage
|
|
5. Cache responses when appropriate
|
|
|
|
## Contributing
|
|
|
|
Please follow these guidelines:
|
|
1. Document any new system prompts
|
|
2. Include usage examples
|
|
3. Add performance benchmarks
|
|
4. Document API changes |