File size: 621 Bytes
06f0c14
 
 
 
 
1
2
3
4
5
{
  "source_url": "https://salt.sunbird.ai/sunflower/sunflower/#__codelineno-3-1",
  "chunk_id": "100_17",
  "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"
}