This page provides an overview of Assistant Config APIs.
Endpoint, URL, and Supported Methods
Objects are managed via the View Assistant server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/assistant
Supported methods include:GET
HEAD
POST
PUT
DELETE
Structure
{
"GUID": "8d48511f-dc01-4b11-9eb7-f5bad86c482c",
"Name": "botox",
"Description": null,
"SystemPrompt": "You are an AI assistant augmented with a retrieval system. Carefully analyze the provided pieces of context and the user query at the end. \n\nRely primarily on the provided context for your response. If the context is not enough for you to answer the question, please politely explain that you do not have enough relevant information to answer. \n\nDo not try to make up an answer. Do not attempt to answer using general knowledge.",
"EmbeddingModel": "sentence-transformers/all-MiniLM-L6-v2",
"MaxResults": 10,
"VectorDatabaseName": "vectordb",
"VectorDatabaseTable": "view-73871c0b-00cd-44f0-be5f-f5612523d8c5",
"VectorDatabaseHostname": "pgvector",
"VectorDatabasePort": 5432,
"VectorDatabaseUser": "postgres",
"VectorDatabasePassword": "password",
"GenerationProvider": "ollama",
"GenerationModel": "qwen2.5:latest",
"GenerationApiKey": "",
"Temperature": 0.1,
"TopP": 0.95,
"MaxTokens": 4000,
"OllamaHostname": "192.168.86.250",
"OllamaPort": 11434,
"OllamaContextLength": null,
"ContextSort": true,
"SortBySimilarity": true,
"ContextScope": 5,
"Rerank": true,
"RerankModel": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RerankTopK": 5,
"RerankLevel": "Chunk",
"TimestampEnabled": true,
"TimestampFormat": "Date",
"TimestampTimezone": "UTC",
"UseCitations": false,
"CreatedUTC": "2025-04-11T19:05:56.694880",
"LastModifiedUTC": "2025-04-11T19:05:56.694880",
"ChatOnly": false
}
Properties
GUID
string
unique identifier for the configurationName
string
name of the assistantDescription
string|null
optional description of the assistantSystemPrompt
string
initial system message that defines assistant behaviorEmbeddingModel
string
model used for embedding (e.g.sentence-transformers/all-MiniLM-L6-v2
)MaxResults
number
maximum number of results to retrieve from the vector databaseVectorDatabaseName
string
name of the vector databaseVectorDatabaseTable
string
table/view name used for querying vectorsVectorDatabaseHostname
string
hostname of the vector databaseVectorDatabasePort
number
port number of the vector databaseVectorDatabaseUser
string
username used to connect to the vector databaseVectorDatabasePassword
string
password for the vector databaseGenerationProvider
string
provider used for text generation (e.g.ollama
)GenerationModel
string
model used for generating text (e.g.qwen2.5:latest
)GenerationApiKey
string
API key used for the generation providerTemperature
number
controls randomness in generation (higher = more random)TopP
number
nucleus sampling threshold for token generationMaxTokens
number
maximum number of tokens allowed in the responseOllamaHostname
string
hostname of the Ollama generation serverOllamaPort
number
port of the Ollama generation serverOllamaContextLength
number|null
max context window for Ollama (null for default)ContextSort
boolean
whether to sort context entriesSortBySimilarity
boolean
whether to sort context entries by vector similarityContextScope
number
number of top context entries to includeRerank
boolean
whether to apply a reranker modelRerankModel
string
model used for reranking resultsRerankTopK
number
top K results to pass through rerankerRerankLevel
string
reranking granularity level (e.g.Chunk
)TimestampEnabled
boolean
whether to include timestamps in outputTimestampFormat
string
format for timestamp (e.g.Date
,ISO
)TimestampTimezone
string
timezone for timestamp formatting (e.g.UTC
)UseCitations
boolean
whether to include citations in generated outputCreatedUTC
datetime
timestamp of creation in UTCLastModifiedUTC
datetime
last modified timestamp in UTCChatOnly
boolean
whether this assistant is restricted to chat-only interactions
Create RAG config
To create, callPOST /v1.0/tenants/[tenant-guid]/assistant/configs
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Basic RAG Assistant",
"Description": "uses qwen2.5:7b - ollama",
"SystemPrompt": "Use the provided context to answer questions.",
"EmbeddingModel": "sentence-transformers/all-MiniLM-L6-v2",
"MaxResults": 10,
"VectorDatabaseName": "vectordb",
"VectorDatabaseTable": "minilm",
"VectorDatabaseHostname": "pgvector",
"VectorDatabasePort": 5432,
"VectorDatabaseUser": "postgres",
"VectorDatabasePassword": "password",
"GenerationProvider": "ollama",
"GenerationApiKey": "",
"GenerationModel": "qwen2.5:7b",
"HuggingFaceApiKey": "",
"Temperature": 0.1,
"TopP": 0.95,
"MaxTokens": 500,
"OllamaHostname": "ollama",
"OllamaPort": 11434,
"ContextSort": true,
"SortByMaxSimilarity": true,
"ContextScope": 0,
"Rerank": true,
"RerankModel": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RerankTopK": 3
}'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const createAssistant = async () => {
try {
const response = await assistant.createAssistantConfig({
Name: "Basic RAG Assistant",
Description: "uses qwen2.5:7b - ollama",
SystemPrompt: "Use the provided context to answer questions.",
EmbeddingModel: "sentence-transformers/all-MiniLM-L6-v2",
MaxResults: 10,
VectorDatabaseName: "vectordb",
VectorDatabaseTable: "minilm",
VectorDatabaseHostname: "pgvector",
VectorDatabasePort: 5432,
VectorDatabaseUser: "postgres",
VectorDatabasePassword: "password",
GenerationProvider: "ollama",
GenerationApiKey: "",
GenerationModel: "qwen2.5:7b",
HuggingFaceApiKey: "",
Temperature: 0.1,
TopP: 0.95,
MaxTokens: 500,
OllamaHostname: "ollama",
OllamaPort: 11434,
ContextSort: true,
SortByMaxSimilarity: true,
ContextScope: 0,
Rerank: true,
RerankModel: "cross-encoder/ms-marco-MiniLM-L-6-v2",
RerankTopK: 3,
});
console.log(response);
} catch (err) {
console.log("Error creating assistant:", err);
}
};
createAssistant();
Create chat only config
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Chat Only Blackbeard Assistant",
"Description": "uses qwen2.5:7b - ollama",
"SystemPrompt": "You are Edward Teach (c. 1680 – 22 November 1718), better known as the pirate Blackbeard. Talk like a pirate and only answer questions with period correct answers.",
"GenerationProvider": "ollama",
"GenerationApiKey": "",
"GenerationModel": "qwen2.5:7b",
"Temperature": 0.1,
"TopP": 0.95,
"MaxTokens": 500,
"OllamaHostname": "ollama",
"OllamaPort": 11434,
"ChatOnly": true
}'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const createAssistant = async () => {
try {
const response = await assistant.createAssistantConfig({
Name: "Chat Only Blackbeard Assistant",
Description: "uses qwen2.5:7b - ollama",
SystemPrompt:
"You are Edward Teach (c. 1680 – 22 November 1718), better known as the pirate Blackbeard. Talk like a pirate and only answer questions with period correct answers.",
GenerationProvider: "ollama",
GenerationApiKey: "",
GenerationModel: "qwen2.5:7b",
Temperature: 0.1,
TopP: 0.95,
MaxTokens: 500,
OllamaHostname: "ollama",
OllamaPort: 11434,
ChatOnly: true,
});
console.log(response);
} catch (err) {
console.log("Error creating assistant:", err);
}
};
// createAssistant();
Read
To read config by GUID, call GET /v1.0/tenants/[tenant-guid]/assistant/configs/[config-guid]
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs/8d48511f-dc01-4b11-9eb7-f5bad86c482c'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const readAssistant = async () => {
try {
const response = await assistant.retrieveAssistantConfig(
"039c4efd-3907-425f-964e-5e6a5b5e1ebe"
);
console.log(response);
} catch (err) {
console.log("Error reading assistant:", err);
}
};
readAssistant();
Read all
To read al configs, call GET /v1.0/tenants/[tenant-guid]/assistant/configs
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const readAllConfigs = async () => {
try {
const response = await assistant.retrieveAssistantConfigs();
console.log(response);
} catch (err) {
console.log("Error reading all configs:", err);
}
};
readAllConfigs();
Response
{
"AssistantConfigs": [
{
"GUID": "8d48511f-dc01-4b11-9eb7-f5bad86c482c",
"Name": "botox",
"Description": null,
"CreatedUTC": "2025-04-11T19:05:56.713900Z"
}
}
Update
To update a config by GUID, call PUT /v1.0/tenants/[tenant-guid]/assistant/configs/[config-guid]
curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs/00000000-0000-0000-0000-000000000000' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Updated RAG Assistant",
"Description": "uses qwen2.5:7b - ollama",
"SystemPrompt": "Use the provided context to answer questions.",
"EmbeddingModel": "sentence-transformers/all-MiniLM-L6-v2",
"MaxResults": 10,
"VectorDatabaseName": "vectordb",
"VectorDatabaseTable": "minilm",
"VectorDatabaseHostname": "pgvector",
"VectorDatabasePort": 5432,
"VectorDatabaseUser": "postgres",
"VectorDatabasePassword": "password",
"GenerationProvider": "ollama",
"GenerationApiKey": "",
"GenerationModel": "qwen2.5:7b",
"HuggingFaceApiKey": "",
"Temperature": 0.1,
"TopP": 0.95,
"MaxTokens": 500,
"OllamaHostname": "ollama",
"OllamaPort": 11434,
"ContextSort": true,
"SortByMaxSimilarity": true,
"ContextScope": 0,
"Rerank": true,
"RerankModel": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RerankTopK": 3
}'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const updateAssistantConfig = async () => {
try {
const response = await assistant.updateAssistantConfig({
GUID: "039c4efd-3907-425f-964e-5e6a5b5e1ebe",
Name: "Basic RAG Assistant [ASHISH_UPDATED]",
Description: "uses qwen2.5:7b - ollama",
SystemPrompt: "Use the provided context to answer questions.",
EmbeddingModel: "sentence-transformers/all-MiniLM-L6-v2",
MaxResults: 10,
VectorDatabaseName: "vectordb",
VectorDatabaseTable: "minilm",
VectorDatabaseHostname: "pgvector",
VectorDatabasePort: 5432,
VectorDatabaseUser: "postgres",
VectorDatabasePassword: "password",
GenerationProvider: "ollama",
GenerationModel: "qwen2.5:7b",
GenerationApiKey: "",
Temperature: 0.1,
TopP: 0.95,
MaxTokens: 500,
OllamaHostname: "ollama",
OllamaPort: 11434,
OllamaContextLength: null,
ContextSort: true,
SortBySimilarity: true,
ContextScope: 0,
Rerank: true,
RerankModel: "cross-encoder/ms-marco-MiniLM-L-6-v2",
RerankTopK: 3,
RerankLevel: "Chunk",
TimestampEnabled: true,
TimestampFormat: "Date",
TimestampTimezone: "UTC",
UseCitations: false,
CreatedUTC: "2025-04-22T09:57:18.942204",
LastModifiedUTC: "2025-04-22T09:57:18.942204",
ChatOnly: false,
});
console.log(response);
} catch (err) {
console.log("Error updating assistant config:", err);
}
};
updateAssistantConfig();
Delete
To read config by GUID, call DELETE /v1.0/tenants/[tenant-guid]/assistant/configs/[config-guid]
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs/8d48511f-dc01-4b11-9eb7-f5bad86c482c'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const readAssistant = async () => {
try {
const response = await assistant.retrieveAssistantConfig(
"039c4efd-3907-425f-964e-5e6a5b5e1ebe"
);
console.log(response);
} catch (err) {
console.log("Error reading assistant:", err);
}
};
readAssistant();
Check existence
To check existence of a config by GUID, call HEAD /v1.0/tenants/[tenant-guid]/assistant/configs/[config-guid]
curl --location --head 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/assistant/configs/00000000-0000-0000-0000-000000000000'
import { ViewAssistantSdk } from "view-sdk";
const assistant = new ViewAssistantSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const existingAssistant = async () => {
try {
const response = await assistant.existsAssistantConfig(
"039c4efd-3907-425f-964e-5e6a5b5e1ebe"
);
console.log(response);
} catch (err) {
console.log("Error retrieving assistant:", err);
}
};
existingAssistant();