AI
Generate text
Sends an AI request to supported Large Language Models (LLMs) and returns generated text based on the provided prompt.
post/ai/text_gen
Request body
Example request
{
"prompt": "Write an email to a client about the importance of public APIs.",
"items": [
{
"id": "123",
"type": "file",
"content": "This is file content that is relevant to the text gen request."
}
],
"dialogue_history": [
{
"prompt": "Make my email about public APIs sound more professional.",
"answer": "Here is the first draft of your professional email about public APIs.",
"created_at": "2012-12-12T10:53:43-08:00"
}
],
"ai_agent": {
"type": "ai_agent_id",
"id": "14031"
}
}Response
A successful response including the answer from the LLM.
Example response
{
"answer": "Public APIs are important because of key and important reasons.",
"created_at": "2012-12-12T10:53:43-08:00",
"completion_reason": "done",
"ai_agent_info": {
"models": [
{
"name": "azure__openai__text_embedding_ada_002",
"provider": "azure",
"supported_purpose": "embedding"
}
],
"processor": "basic_text"
}
}