Advanced Chat
Advanced chat completion using Llama-3 and other high-performance models on Subnet 4.
Generate a response
Generate AI-driven responses using various high-performance language models.
Required attributes
- Name
model
- Type
- string
- Description
The model to use for generating responses. Defaults to
nvidia/Llama-3.1-Nemotron-70B-Instruct-HF
.
- Name
messages
- Type
- array
- Description
Array of message objects with role (user, assistant, or system) and content.
Optional attributes
- Name
max_tokens
- Type
- integer
- Description
Maximum length of generated response. Defaults to 500.
- Name
stream
- Type
- boolean
- Description
Whether to stream the response. Defaults to true.
- Name
logprobs
- Type
- boolean
- Description
Whether to include log probabilities. Defaults to false.
Request
curl -X POST "https://api.bitmind.ai/oracle/v1/4/chat/completions" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"model": "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"max_tokens": 500,
"stream": false,
"logprobs": false
}'
Response
{
"id": "chatcmpl-gTVsVEPtRD60cPFJIu5fRQ",
"object": "chat.completion",
"created": 1739374705,
"model": "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF",
"choices": [
{
"message": {
"role": "assistant",
"content": "**Hello!**\n\n* **I'm doing great, thank you for asking!** As a computer program, I don't have emotions or feelings like humans do, but I'm always happy to engage in conversations and assist with any questions or topics you'd like to discuss.\n* **I'm fully functional and ready to help** with anything from:\n\t+ Answering general knowledge questions\n\t+ Providing explanations on various subjects (e.g., science, history, technology)\n\t+ Offering language translation and grammar assistance\n\t+ Engaging in casual conversations or debates\n\t+ Generating creative content (e.g., stories, poems)\n\t+ And much more!\n\n**How about you?**\n\n* How's your day going so far?\n* Is there something specific on your mind that you'd like to talk about or ask for help with?\n* Or would you like some suggestions for conversation topics or fun activities we can do together in this chat?",
"reasoning_content": null,
"tool_calls": []
}
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 2
},
"system_fingerprint": null
}
The advanced chat model
The advanced chat model contains the chat completion results.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the completion.
- Name
object
- Type
- string
- Description
Object type, always "chat.completion".
- Name
created
- Type
- integer
- Description
Unix timestamp of when the completion was created.
- Name
model
- Type
- string
- Description
The model used for completion.
- Name
choices
- Type
- array
- Description
Array containing the completion messages, including:
message.role
: Role of the message sendermessage.content
: The message contentmessage.reasoning_content
: Additional reasoning (if available)message.tool_calls
: Array of tool calls (if any)
- Name
usage
- Type
- object
- Description
Token usage statistics including prompt, completion, and total tokens.
- Name
system_fingerprint
- Type
- string | null
- Description
System fingerprint for the completion, if available.