# 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

```python
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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.groclake.ai/lakes/data-and-model-management/modellake/interactive-blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
