@openclueo/sdk
v2.0.1
Published
Official JavaScript SDK for Clueo AI Personality API with Big Five model integration
Maintainers
Readme
🚀 Clueo JavaScript SDK
Inject AI personalities using the Big Five model in just 3 lines of code.
Quick Start
// 1. Import SDK
const clueo = new Clueo('ck_your_api_key_here')
// 2. Inject personality into prompt
const result = await clueo.inject('How do I scale my startup?', {
openness: 8, // Creative, innovative (1-10)
conscientiousness: 7, // Organized, disciplined (1-10)
extraversion: 6, // Outgoing, social (1-10)
agreeableness: 5, // Cooperative, trusting (1-10)
neuroticism: 3 // Calm, stable (1-10)
})
// 3. Use result
console.log(result.injected_prompt)Installation
NPM
npm install @openclueo/sdk// ES6 modules
import Clueo from '@openclueo/sdk'
// CommonJS
const Clueo = require('@openclueo/sdk')Browser (CDN)
<script src="https://unpkg.com/@openclueo/sdk@latest/clueo.js"></script>
<script>
const clueo = new Clueo('ck_your_api_key_here')
</script>API Examples
Personality Injection (Big Five Model)
const result = await clueo.inject('How should I approach this problem?', {
openness: 9, // Highly creative and innovative
conscientiousness: 6, // Moderately organized
extraversion: 4, // Introverted, thoughtful
agreeableness: 7, // Cooperative and helpful
neuroticism: 2 // Very calm and stable
})
console.log(result.injected_prompt)Conversation Simulation
const response = await clueo.simulate('What should I focus on next?', {
openness: 8,
conscientiousness: 9,
extraversion: 7,
agreeableness: 6,
neuroticism: 3
})
console.log(response.response)Bring Your Own OpenAI Key
const result = await clueo.inject('Tell me about startups', {
openness: 8,
conscientiousness: 7,
extraversion: 6,
agreeableness: 5,
neuroticism: 3,
openaiKey: 'sk_your_openai_key_here' // Optional: use your own key
})Legacy Transform (Still Supported)
const result = await clueo.transform('Hey!', 'Professional')
console.log(result.transformed)Raw API (No SDK)
cURL
curl -X POST https://backend.clueoai.com/api/enhanced/inject \
-H "x-api-key: ck_your_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "How do I scale my startup?",
"personalityConfig": {
"openness": 8,
"conscientiousness": 7,
"extraversion": 6,
"agreeableness": 5,
"neuroticism": 3
}
}'JavaScript (Fetch)
const response = await fetch('https://backend.clueoai.com/api/enhanced/inject', {
method: 'POST',
headers: {
'x-api-key': 'ck_your_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'How do I scale my startup?',
personalityConfig: {
openness: 8,
conscientiousness: 7,
extraversion: 6,
agreeableness: 5,
neuroticism: 3
}
})
})
const result = await response.json()
console.log(result.data.injected_prompt)Python
import requests
response = requests.post('https://backend.clueoai.com/api/enhanced/inject',
headers={'x-api-key': 'ck_your_key'},
json={
'prompt': 'How do I scale my startup?',
'personalityConfig': {
'openness': 8,
'conscientiousness': 7,
'extraversion': 6,
'agreeableness': 5,
'neuroticism': 3
}
}
)
print(response.json()['data']['injected_prompt'])Get Your API Key
- Sign up at api.clueoai.com
- Copy your
ck_API key from the dashboard - Start transforming!
Free tier: 1,000 requests/month
No credit card required
Support
- 📧 Email: [email protected]
- 💬 Discord: Join Community
- 📖 Docs: clueoai.com/docs
Made with ❤️ by the Clueo team
