Conversation AI

The Modellake().chat_complete(payload)method in Modellake empowers developers to create advanced conversational applications by leveraging AI for dynamic and intelligent chat completions. It accepts a structured payload with user prompts, generating coherent, contextually aware responses.

Request Payload and Method

chat_completion_request = {
    "groc_account_id": "c4ca4238a0b923820dcc509a6f75849b",
    "messages": [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "which model are you using?"}
    ]
}

text = modellake.chat_complete(chat_completion_request)
print("Response :", text)

Example Response

Response : {'answer': 'I am using the GPT-4 model.'}

Last updated