Datasets:
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- chunks/chunk_100_0.json +5 -0
- chunks/chunk_100_1.json +5 -0
- chunks/chunk_100_10.json +5 -0
- chunks/chunk_100_11.json +5 -0
- chunks/chunk_100_12.json +5 -0
- chunks/chunk_100_13.json +5 -0
- chunks/chunk_100_14.json +5 -0
- chunks/chunk_100_15.json +5 -0
- chunks/chunk_100_16.json +5 -0
- chunks/chunk_100_17.json +5 -0
- chunks/chunk_100_18.json +5 -0
- chunks/chunk_100_19.json +5 -0
- chunks/chunk_100_2.json +5 -0
- chunks/chunk_100_20.json +5 -0
- chunks/chunk_100_21.json +5 -0
- chunks/chunk_100_22.json +5 -0
- chunks/chunk_100_23.json +5 -0
- chunks/chunk_100_24.json +5 -0
- chunks/chunk_100_25.json +5 -0
- chunks/chunk_100_26.json +5 -0
- chunks/chunk_100_27.json +5 -0
- chunks/chunk_100_28.json +5 -0
- chunks/chunk_100_29.json +5 -0
- chunks/chunk_100_3.json +5 -0
- chunks/chunk_100_30.json +5 -0
- chunks/chunk_100_31.json +5 -0
- chunks/chunk_100_32.json +5 -0
- chunks/chunk_100_33.json +5 -0
- chunks/chunk_100_34.json +5 -0
- chunks/chunk_100_35.json +5 -0
- chunks/chunk_100_36.json +5 -0
- chunks/chunk_100_37.json +5 -0
- chunks/chunk_100_4.json +5 -0
- chunks/chunk_100_5.json +5 -0
- chunks/chunk_100_6.json +5 -0
- chunks/chunk_100_7.json +5 -0
- chunks/chunk_100_8.json +5 -0
- chunks/chunk_100_9.json +5 -0
- chunks/chunk_10_0.json +5 -0
- chunks/chunk_10_1.json +5 -0
- chunks/chunk_10_2.json +5 -0
- chunks/chunk_10_3.json +5 -0
- chunks/chunk_11_0.json +5 -0
- chunks/chunk_11_1.json +5 -0
- chunks/chunk_11_2.json +5 -0
- chunks/chunk_11_3.json +5 -0
- chunks/chunk_11_4.json +5 -0
- chunks/chunk_11_5.json +5 -0
- chunks/chunk_11_6.json +5 -0
- chunks/chunk_11_7.json +5 -0
chunks/chunk_100_0.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_0",
|
| 4 |
+
"text": "Sunflower API Documentation Version 1.0 Date September 2025 Developed by Sunbird AI Table of Contents Introduction Authentication Rate Limiting API Endpoints Error Handling Code Examples Best Practices Troubleshooting Introduction The Sunflower API provides access to Sunbird AIs multilingual language model, specifically designed for Ugandan languages. The API specializes in Multilingual conversations in Ugandan languages (Luganda, Acholi, Ateso, etc.) Cross-lingual translations and explanations "
|
| 5 |
+
}
|
chunks/chunk_100_1.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_1",
|
| 4 |
+
"text": "ons in Ugandan languages (Luganda, Acholi, Ateso, etc.) Cross-lingual translations and explanations Cultural context understanding Educational content in local languages Key Features Automatic retry with exponential backoff Context-aware responses Usage tracking and monitoring Support for custom system messages Message history management Professional error handling Model Information Primary Model SunbirdSunflower-14B-FP8 Supported Languages Luganda, Acholi, Ateso, English, and other Ugandan lang"
|
| 5 |
+
}
|
chunks/chunk_100_10.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_10",
|
| 4 |
+
"text": "25-09-26T103000Z Common Error Messages Model Loading (503) detail The AI model is currently loading. This usually takes 2-3 minutes. Please try again shortly. Timeout (504) detail The request timed out. Please try again with a shorter prompt or check your network connection. Invalid Request (400) detail Message 0 content cannot be empty Code Examples Python Examples 1. Basic Chat Completion import requests import json def chatwithsunflower ( messages , apikey , baseurl httpsapi.sunbir"
|
| 5 |
+
}
|
chunks/chunk_100_11.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_11",
|
| 4 |
+
"text": "ion import requests import json def chatwithsunflower ( messages , apikey , baseurl httpsapi.sunbird.ai ) Send a chat completion request to Sunflower API url f baseurl taskssunflowerinference headers Authorization f Bearer apikey , Content-Type applicationjson payload messages messages , modeltype qwen , temperature 0.3 , stream False try response requests . post ( url , headers headers , json payload , timeout 30 ) response . raiseforstatus () return response . json ("
|
| 5 |
+
}
|
chunks/chunk_100_12.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_12",
|
| 4 |
+
"text": "aders headers , json payload , timeout 30 ) response . raiseforstatus () return response . json () except requests . exceptions . RequestException as e print ( f Request failed e ) return None Example usage apikey yourapikeyhere messages role system , content You are Sunflower, a multilingual assistant for Ugandan languages made by Sunbird AI. , role user , content Translate Good morning to Luganda result chatwithsunflower ( messages , apikey ) if result print ( f Response "
|
| 5 |
+
}
|
chunks/chunk_100_13.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_13",
|
| 4 |
+
"text": "morning to Luganda result chatwithsunflower ( messages , apikey ) if result print ( f Response result content ) print ( f Tokens used result usage totaltokens ) 2. Simple Inference import requests def simpleinference ( instruction , apikey , baseurl httpsapi.sunbird.ai ) Send a simple inference request to Sunflower API url f baseurl taskssunflowersimple headers Authorization f Bearer apikey data instruction instruction , modeltype qwen , temperature 0.3 try re"
|
| 5 |
+
}
|
chunks/chunk_100_14.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_14",
|
| 4 |
+
"text": "n f Bearer apikey data instruction instruction , modeltype qwen , temperature 0.3 try response requests . post ( url , headers headers , data data , timeout 30 ) response . raiseforstatus () return response . json () except requests . exceptions . RequestException as e print ( f Request failed e ) return None Example usage apikey yourapikeyhere instruction Explain the meaning of Ubuntu in Ugandan context result simpleinference ( instruction , apikey ) if result print ( f"
|
| 5 |
+
}
|
chunks/chunk_100_15.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_15",
|
| 4 |
+
"text": "g of Ubuntu in Ugandan context result simpleinference ( instruction , apikey ) if result print ( f Response result response ) 3. Conversation Management class SunflowerConversation def init ( self , apikey , baseurl httpsapi.sunbird.ai ) self . apikey apikey self . baseurl baseurl self . messages def setsystemmessage ( self , message ) Set or update the system message Remove existing system message self . messages msg for msg in self . messages if msg role ! system Add new sy"
|
| 5 |
+
}
|
chunks/chunk_100_16.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_16",
|
| 4 |
+
"text": " system message self . messages msg for msg in self . messages if msg role ! system Add new system message at the beginning self . messages . insert ( 0 , role system , content message ) def addusermessage ( self , content ) Add a user message to the conversation self . messages . append ( role user , content content ) def getresponse ( self , modeltype qwen , temperature 0.3 ) Get AI response and add it to conversation url f self . baseurl taskssunflowerinference headers Auth"
|
| 5 |
+
}
|
chunks/chunk_100_17.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_17",
|
| 4 |
+
"text": " response and add it to conversation url f self . baseurl taskssunflowerinference headers Authorization f Bearer self . apikey , Content-Type applicationjson payload messages self . messages , modeltype modeltype , temperature temperature try response requests . post ( url , headers headers , json payload , timeout 30 ) response . raiseforstatus () result response . json () Add assistant response to conversation self . messages . append ( role assistant , content resul"
|
| 5 |
+
}
|
chunks/chunk_100_18.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_18",
|
| 4 |
+
"text": " Add assistant response to conversation self . messages . append ( role assistant , content result content ) return result except requests . exceptions . RequestException as e print ( f Request failed e ) return None def clearconversation ( self ) Clear conversation history but keep system message systemmessages msg for msg in self . messages if msg role system self . messages systemmessages Example usage conversation SunflowerConversation ( yourapikeyhere ) Set system message"
|
| 5 |
+
}
|
chunks/chunk_100_19.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_19",
|
| 4 |
+
"text": "emmessages Example usage conversation SunflowerConversation ( yourapikeyhere ) Set system message conversation . setsystemmessage ( You are Sunflower, a helpful assistant specializing in Ugandan languages and culture. ) Have a conversation conversation . addusermessage ( Hello, can you greet me in Luganda? ) response1 conversation . getresponse () print ( f AI response1 content ) conversation . addusermessage ( How do I say thank you in Acholi? ) response2 conversation . getresponse ("
|
| 5 |
+
}
|
chunks/chunk_100_2.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_2",
|
| 4 |
+
"text": "SunbirdSunflower-14B-FP8 Supported Languages Luganda, Acholi, Ateso, English, and other Ugandan languages Model Types Qwen Authentication All API requests require authentication using a valid API key. Include your API key in the request headers Authorization Bearer YOURAPIKEY Obtaining API Keys If you dont already have an account, create one at httpsapi.sunbird.airegister and login. Go to the tokens page to get your access token which youll use to authenticate Rate Limiting The API implements ra"
|
| 5 |
+
}
|
chunks/chunk_100_20.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_20",
|
| 4 |
+
"text": "ation . addusermessage ( How do I say thank you in Acholi? ) response2 conversation . getresponse () print ( f AI response2 content ) 4. Error Handling with Retry Logic import time import random from typing import Optional def sunflowerrequestwithretry ( messages , apikey , maxretries 3 , basedelay 2.0 , baseurl httpsapi.sunbird.ai ) - Optional dict Make a request to Sunflower API with exponential backoff retry url f baseurl taskssunflowerinference headers Authorization f Bea"
|
| 5 |
+
}
|
chunks/chunk_100_21.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_21",
|
| 4 |
+
"text": " exponential backoff retry url f baseurl taskssunflowerinference headers Authorization f Bearer apikey , Content-Type applicationjson payload messages messages , modeltype qwen , temperature 0.3 for attempt in range ( maxretries 1 ) try response requests . post ( url , headers headers , json payload , timeout 30 ) if response . statuscode 200 return response . json () elif response . statuscode 503 Model loading - retry with longer delay if attempt maxretries dela"
|
| 5 |
+
}
|
chunks/chunk_100_22.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_22",
|
| 4 |
+
"text": "if response . statuscode 503 Model loading - retry with longer delay if attempt maxretries delay basedelay ( 2 attempt ) random . uniform ( 0 , 1 ) print ( f Model loading, retrying in delay .1f seconds... ) time . sleep ( delay ) continue elif response . statuscode 429 Rate limited - retry with exponential backoff if attempt maxretries delay basedelay ( 2 attempt ) print ( f Rate limited, retrying in delay .1f seconds... ) time . sleep ( delay ) continue else print ( f R"
|
| 5 |
+
}
|
chunks/chunk_100_23.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_23",
|
| 4 |
+
"text": "ate limited, retrying in delay .1f seconds... ) time . sleep ( delay ) continue else print ( f Request failed with status response . statuscode response . text ) return None except requests . exceptions . Timeout if attempt maxretries delay basedelay ( 2 attempt ) print ( f Request timed out, retrying in delay .1f seconds... ) time . sleep ( delay ) continue else print ( Request timed out after all retries ) return None except requests . exceptions . RequestException as e pr"
|
| 5 |
+
}
|
chunks/chunk_100_24.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_24",
|
| 4 |
+
"text": "t timed out after all retries ) return None except requests . exceptions . RequestException as e print ( f Request failed e ) return None print ( All retry attempts exhausted ) return None Example usage messages role user , content What is the capital of Uganda? result sunflowerrequestwithretry ( messages , yourapikeyhere ) if result print ( f Response result content ) JavaScriptNode.js Examples 1. Basic Chat Completion const axios require ( axios ) async function chatWithSun"
|
| 5 |
+
}
|
chunks/chunk_100_25.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_25",
|
| 4 |
+
"text": "tNode.js Examples 1. Basic Chat Completion const axios require ( axios ) async function chatWithSunflower ( messages , apiKey , baseUrl httpsapi.sunbird.ai ) const url baseUrl taskssunflowerinference const headers Authorization Bearer apiKey , Content-Type applicationjson const payload messages messages , modeltype qwen , temperature 0.3 , stream false try const response await axios . post ( url , payload , headers headers , timeout 30000 ) return response . data ca"
|
| 5 |
+
}
|
chunks/chunk_100_26.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_26",
|
| 4 |
+
"text": "wait axios . post ( url , payload , headers headers , timeout 30000 ) return response . data catch ( error ) console . error ( Request failed , error . message ) if ( error . response ) console . error ( Response data , error . response . data ) return null Example usage const apiKey yourapikeyhere const messages role system , content You are Sunflower, a multilingual assistant for Ugandan languages. , role user , content How do you say welcome in Luganda? chatWithSunflow"
|
| 5 |
+
}
|
chunks/chunk_100_27.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_27",
|
| 4 |
+
"text": "for Ugandan languages. , role user , content How do you say welcome in Luganda? chatWithSunflower ( messages , apiKey ) . then ( result if ( result ) console . log ( Response , result . content ) console . log ( Tokens used , result . usage . totaltokens ) ) 2. Simple Inference const FormData require ( form-data ) const axios require ( axios ) async function simpleInference ( instruction , apiKey , baseUrl httpsapi.sunbird.ai ) const url baseUrl taskssunflowersimple const formD"
|
| 5 |
+
}
|
chunks/chunk_100_28.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_28",
|
| 4 |
+
"text": "n , apiKey , baseUrl httpsapi.sunbird.ai ) const url baseUrl taskssunflowersimple const formData new FormData () formData . append ( instruction , instruction ) formData . append ( modeltype , qwen ) formData . append ( temperature , 0.3 ) const headers Authorization Bearer apiKey , ... formData . getHeaders () try const response await axios . post ( url , formData , headers headers , timeout 30000 ) return response . data catch ( error ) console . error ( Request failed ,"
|
| 5 |
+
}
|
chunks/chunk_100_29.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_29",
|
| 4 |
+
"text": "ders , timeout 30000 ) return response . data catch ( error ) console . error ( Request failed , error . message ) return null Example usage const apiKey yourapikeyhere const instruction Translate How are you? to Ateso simpleInference ( instruction , apiKey ) . then ( result if ( result ) console . log ( Response , result . response ) ) cURL Examples 1. Chat Completion curl -X POST httpsapi.sunbird.aitaskssunflowerinference -H Authorization Bearer YOURAPIKEY -H Content-Type app"
|
| 5 |
+
}
|
chunks/chunk_100_3.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_3",
|
| 4 |
+
"text": "ns page to get your access token which youll use to authenticate Rate Limiting The API implements rate limiting based on account types Free Tier Limited requests per hour Professional Higher rate limits Enterprise Custom rate limits API Endpoints 1. Chat Completions Endpoint Endpoint POST taskssunflowerinference Professional endpoint for multilingual chat completions with full conversation management. Request Format messages role systemuserassistant , content Message content , modeltype "
|
| 5 |
+
}
|
chunks/chunk_100_30.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_30",
|
| 4 |
+
"text": " httpsapi.sunbird.aitaskssunflowerinference -H Authorization Bearer YOURAPIKEY -H Content-Type applicationjson -d messages role system, content You are Sunflower, a multilingual assistant for Ugandan languages made by Sunbird AI. , role user, content Translate Good evening to Luganda , modeltype qwen, temperature 0.3 2. Simple Inference curl -X POST httpsapi.sunbird.aitaskssunflowersimple -H Authorization Bearer YOURAPIKEY -F instructionWhat are some traditional Ugandan foods? -F mod"
|
| 5 |
+
}
|
chunks/chunk_100_31.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_31",
|
| 4 |
+
"text": " -H Authorization Bearer YOURAPIKEY -F instructionWhat are some traditional Ugandan foods? -F modeltypeqwen -F temperature0.3 Best Practices 1. Message Management Always include a system message to provide context and improve response quality Keep conversation history relevant - trim old messages to stay within token limits Use clear, specific prompts for better results 2. Error Handling Implement retry logic for transient errors (503, 504, 429) Handle model loading delays - allow 2-3 minute"
|
| 5 |
+
}
|
chunks/chunk_100_32.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_32",
|
| 4 |
+
"text": "ment retry logic for transient errors (503, 504, 429) Handle model loading delays - allow 2-3 minutes for cold starts Validate input before sending requests 3. Performance Optimization Use appropriate temperature settings 0.0-0.3 More deterministic, good for translations 0.4-0.7 Balanced creativity 0.8-1.0 More creative responses Consider using simple endpoint for single-turn interactions Implement caching for repeated requests 4. Rate Limiting Monitor rate limit headers in responses Implement "
|
| 5 |
+
}
|
chunks/chunk_100_33.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_33",
|
| 4 |
+
"text": "nt caching for repeated requests 4. Rate Limiting Monitor rate limit headers in responses Implement exponential backoff for rate limit exceeded errors Consider request batching where appropriate 5. Security Never expose API keys in client-side code Use environment variables to store credentials Implement proper authentication in your applications Troubleshooting Common Issues and Solutions 1. Model Loading Errors (503) Problem The AI model is currently loading Solutions - Wait 2-3 minutes before"
|
| 5 |
+
}
|
chunks/chunk_100_34.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_34",
|
| 4 |
+
"text": "l Loading Errors (503) Problem The AI model is currently loading Solutions - Wait 2-3 minutes before retrying - Implement exponential backoff retry logic - Use longer timeout values during cold starts 2. Empty Responses (502) Problem The model returned an empty response Solutions - Rephrase your request to be more specific - Check if the input contains inappropriate content - Try a different temperature setting 3. Timeout Errors (504) Problem Request times out Solutions - Reduce prompt length - "
|
| 5 |
+
}
|
chunks/chunk_100_35.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_35",
|
| 4 |
+
"text": "rature setting 3. Timeout Errors (504) Problem Request times out Solutions - Reduce prompt length - Use simpler queries - Increase timeout values in your code - Check network connectivity 4. Rate Limiting (429) Problem Too many requests Solutions - Implement request queuing - Use exponential backoff - Consider upgrading your account tier 5. Invalid Message Format (400) Problem Message validation errors Solutions - Ensure all messages have role and content fields - Check that content is not empty"
|
| 5 |
+
}
|
chunks/chunk_100_36.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_36",
|
| 4 |
+
"text": "rrors Solutions - Ensure all messages have role and content fields - Check that content is not empty - Validate role values (system, user, assistant) Debugging Tips Enable detailed logging to track requestresponse cycles Test with simple queries first before complex conversations Use the simple endpoint to isolate issues Check API status at Sunbird AIs status page Monitor token usage to avoid unexpected costs Support and Resources Getting Help Email Support infosunbird.ai Documentation httpssalt"
|
| 5 |
+
}
|
chunks/chunk_100_37.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_37",
|
| 4 |
+
"text": "pected costs Support and Resources Getting Help Email Support infosunbird.ai Documentation httpssalt.sunbird.aidocs 2025 Sunbird AI. All rights reserved. This documentation is subject to updates and improvements. Please check the official documentation website for the latest version."
|
| 5 |
+
}
|
chunks/chunk_100_4.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_4",
|
| 4 |
+
"text": "ent. Request Format messages role systemuserassistant , content Message content , modeltype qwen , temperature 0.3 , stream false , systemmessage Optional custom system message Parameters Parameter Type Required Default Description messages Array Yes - List of conversation messages modeltype String No qwen Model type qwen temperature Float No 0.3 Sampling temperature (0.0-2.0) stream Boolean No false Whether to stream the response systemmessage String No null Custom system message Me"
|
| 5 |
+
}
|
chunks/chunk_100_5.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_5",
|
| 4 |
+
"text": "oolean No false Whether to stream the response systemmessage String No null Custom system message Message Object Field Type Required Description role String Yes Message role system, user, or assistant content String Yes Message content (cannot be empty) Response Format content AI response content , modeltype qwen , usage completiontokens 150 , prompttokens 100 , totaltokens 250 , processingtime 2.35 , inferencetime 1.85 , messagecount 3 Response Fields Field Type Description content "
|
| 5 |
+
}
|
chunks/chunk_100_6.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_6",
|
| 4 |
+
"text": "gtime 2.35 , inferencetime 1.85 , messagecount 3 Response Fields Field Type Description content String The AIs response modeltype String Model used for inference usage Object Token usage statistics processingtime Float Total processing time in seconds inferencetime Float Model inference time in seconds messagecount Integer Number of messages processed 2. Simple Inference Endpoint Endpoint POST taskssunflowersimple Simplified interface for single instructionresponse interactions. Request Form"
|
| 5 |
+
}
|
chunks/chunk_100_7.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_7",
|
| 4 |
+
"text": " taskssunflowersimple Simplified interface for single instructionresponse interactions. Request Format (Form Data) instruction Translate Good morning to Luganda , modeltype qwen , temperature 0.3 , systemmessage You are Sunflower, a multilingual assistant for Ugandan languages made by Sunbird AI. Parameter Type Required Default Description instruction String Yes - The instruction or question modeltype String No qwen Model type qwen temperature Float No 0.3 Sampling temperature (0.0-2.0) sy"
|
| 5 |
+
}
|
chunks/chunk_100_8.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_8",
|
| 4 |
+
"text": " modeltype String No qwen Model type qwen temperature Float No 0.3 Sampling temperature (0.0-2.0) systemmessage String No null Custom system message Response Format response AI response content , modeltype qwen , processingtime 1.85 , usage completiontokens 120 , prompttokens 80 , totaltokens 200 , success true Error Handling The API uses standard HTTP status codes and provides detailed error messages. HTTP Status Codes Code Description 200 Success 400 Bad Request - Invalid input 401 "
|
| 5 |
+
}
|
chunks/chunk_100_9.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
|
| 3 |
+
"chunk_id": "100_9",
|
| 4 |
+
"text": " error messages. HTTP Status Codes Code Description 200 Success 400 Bad Request - Invalid input 401 Unauthorized - Invalid API key 429 Too Many Requests - Rate limit exceeded 500 Internal Server Error 502 Bad Gateway - Empty model response 503 Service Unavailable - Model loading 504 Gateway Timeout - Request timeout Error Response Format detail Error description , statuscode 400 , timestamp 2025-09-26T103000Z Common Error Messages Model Loading (503) detail The AI model is currently loadi"
|
| 5 |
+
}
|
chunks/chunk_10_0.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/overview/",
|
| 3 |
+
"chunk_id": "10_0",
|
| 4 |
+
"text": "Sunflower Quantized Inference Overview The Sunflower models are available in 14B and 32B sizes and support 8-bit and 4-bit quantized inference for efficient performance on GPUs with limited memory. Quantization reduces memory requirements while keeping inference quality high, enabling large models to run on consumer-grade GPUs or hardware with limited VRAM. Feature 8-bit 4-bit Memory Usage Higher (16GB for 14B) Lower (10GB for 14B) Speed Fast Faster Accuracy Very Good Slightly Lower VRAM Effic"
|
| 5 |
+
}
|
chunks/chunk_10_1.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/overview/",
|
| 3 |
+
"chunk_id": "10_1",
|
| 4 |
+
"text": "(16GB for 14B) Lower (10GB for 14B) Speed Fast Faster Accuracy Very Good Slightly Lower VRAM Efficiency Moderate High Important Do not set both 8-bit and 4-bit modes at the same time. Sunflower 14B Models 14B 8-bit Balanced memory and accuracy, suitable for most GPUs. 14B 4-bit Optimized for memory-limited GPUs and faster inference, with minimal accuracy trade-off. Sunflower 32B Models 32B 8-bit High accuracy, requires more GPU memory. 32B 4-bit Reduced memory usage, faster inference, sligh"
|
| 5 |
+
}
|
chunks/chunk_10_2.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/overview/",
|
| 3 |
+
"chunk_id": "10_2",
|
| 4 |
+
"text": "bit High accuracy, requires more GPU memory. 32B 4-bit Reduced memory usage, faster inference, slightly lower accuracy. The usage process is identical for 14B and 32B only model size and quantization type differ. Tips Best Practices Use 4-bit models when GPU memory is limited or faster inference is needed. 8-bit models offer a good balance of memory usage and accuracy . Always choose either 8-bit or 4-bit for a model. For large inputs or batch processing, monitor GPU memory to avoid out-of-memo"
|
| 5 |
+
}
|
chunks/chunk_10_3.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/overview/",
|
| 3 |
+
"chunk_id": "10_3",
|
| 4 |
+
"text": " or 4-bit for a model. For large inputs or batch processing, monitor GPU memory to avoid out-of-memory errors. Adjust inference parameters (like sequence length or tokens) for optimal performance based on your hardware."
|
| 5 |
+
}
|
chunks/chunk_11_0.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_0",
|
| 4 |
+
"text": "Sunbird Sunflower Quantized Model Usage Installation Installation Install the required Python packages bash !pip install torch transformers accelerate bitsandbytes torch PyTorch library for model computation. transformers Hugging Face Transformers library for model handling. accelerate Optimizes model loading across devices. bitsandbytes Enables efficient 4-bit and 8-bit model quantization. Import the necessary libraries for loading and running the model. import torch import transformers fr"
|
| 5 |
+
}
|
chunks/chunk_11_1.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_1",
|
| 4 |
+
"text": "mport the necessary libraries for loading and running the model. import torch import transformers from transformers import AutoModelForCausalLM , AutoTokenizer , BitsAndBytesConfig import os from getpass import getpass 3. Authentication Set your Hugging Face token to access models os . environ HFTOKEN getpass ( HFTOKEN ) 4. Load Tokenizer and Model Replace MODELNAME with the specific model you want to use, e.g., SunbirdSunflower-14B-4bit-nf4-bnb or SunbirdSunflower-14B-8bit-bnb . Load toke"
|
| 5 |
+
}
|
chunks/chunk_11_2.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_2",
|
| 4 |
+
"text": "u want to use, e.g., SunbirdSunflower-14B-4bit-nf4-bnb or SunbirdSunflower-14B-8bit-bnb . Load tokenizer tokenizer AutoTokenizer . frompretrained ( MODELNAME ) Configure quantization (choose one) quantizationconfig BitsAndBytesConfig ( For 4-bit models loadin4bit True , bnb4bitquanttype nf4 , bnb4bitcomputedtype torch . bfloat16 , bnb4bitusedoublequant True , For 8-bit models, comment out above and use loadin8bitTrue, llmint8threshold6.0 ) Load model model AutoModelForCausalLM . fr"
|
| 5 |
+
}
|
chunks/chunk_11_3.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_3",
|
| 4 |
+
"text": "t above and use loadin8bitTrue, llmint8threshold6.0 ) Load model model AutoModelForCausalLM . frompretrained ( MODELNAME , quantizationconfig quantizationconfig , devicemap auto , or cuda0 for single GPU trustremotecode True ) Note Only change MODELNAME and adjust quantization parameters. Everything else remains the same for any model. 5. Prepare Chat Prompt Define system message (assistant role) SYSTEMMESSAGE You are Sunflower, a multilingual assistant for Ugandan languages made by Su"
|
| 5 |
+
}
|
chunks/chunk_11_4.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_4",
|
| 4 |
+
"text": "nt role) SYSTEMMESSAGE You are Sunflower, a multilingual assistant for Ugandan languages made by Sunbird AI. You specialise in accurate translations, explanations, summaries, and other cross-lingual tasks. Example user prompt prompttext Sunbird AI is a non-profit research organization in Kampala, Uganda. We build and deploy practical applied machine learning systems for African contexts. userprompt f Translate to Luganda prompttext Structure messages messages role system , content S"
|
| 5 |
+
}
|
chunks/chunk_11_5.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_5",
|
| 4 |
+
"text": "ompt f Translate to Luganda prompttext Structure messages messages role system , content SYSTEMMESSAGE , role user , content userprompt Prepare model input prompt tokenizer . applychattemplate ( messages , tokenize False , addgenerationprompt True ) inputs tokenizer ( prompt , returntensors pt ) . to ( model . device ) 6. Configure Text Generation Streamer outputs tokens in real-time textstreamer transformers . TextStreamer ( tokenizer , skipprompt True , skipspecialtoken"
|
| 5 |
+
}
|
chunks/chunk_11_6.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_6",
|
| 4 |
+
"text": "eal-time textstreamer transformers . TextStreamer ( tokenizer , skipprompt True , skipspecialtokens True ) Generation parameters numbeams 5 Adjust for higher quality generationconfig maxnewtokens 512 , Maximum tokens to generate temperature 0.3 , Lower more deterministic dosample True , Enable sampling norepeatngramsize 5 , Avoid repeated phrases numbeams numbeams , Beam search width Beam search improves output quality but slows generation. TextStreamer works only when numbea"
|
| 5 |
+
}
|
chunks/chunk_11_7.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_url": "https://salt.sunbird.ai/sunflower/inference/",
|
| 3 |
+
"chunk_id": "11_7",
|
| 4 |
+
"text": "width Beam search improves output quality but slows generation. TextStreamer works only when numbeams 1 . 7. Generate Output Generate model output outputs model . generate ( inputs , generationconfig , streamer textstreamer if numbeams 1 else None , ) Decode if using multi-beam search if numbeams 1 response tokenizer . decode ( outputs 0 len ( inputs inputids 0 ), skipspecialtokens True ) print ( response ) Single-beam real-time streaming. Multi-beam output decoded after generat"
|
| 5 |
+
}
|