Graphlit Platform
Developer PortalChangelogPlatform StatusMore InformationJoin Discord
  • Graphlit Platform
    • What is Graphlit?
    • Key Concepts
  • Getting Started
    • Sign up for Graphlit
    • Create Graphlit Project
    • For Python Developers
    • For Node.js Developers
    • For .NET Developers
  • 🚀Quickstart
    • Next.js applications
      • GitHub Code
    • Python applications
      • GitHub Code
  • Graphlit Data API
    • API Usage
      • API Endpoints
      • API Authentication
      • API Explorer
      • GraphQL 101
    • API Reference
      • Content
        • Ingest With Workflow
        • Ingest File
        • Ingest Encoded File
        • Ingest Web Page
        • Ingest Text
        • Semantic Search
          • Query All Content
          • Query Facets
          • Query By Name
          • Filter By Contents
        • Metadata Filtering
          • Filter By Observations
          • Filter By Feeds
          • Filter By Collections
          • Filter By Content Type
          • Filter By File Type
          • Filter By File Size Range
          • Filter By Date Range
        • Summarize Contents
        • Extract Contents
        • Publish Contents
      • Knowledge Graph
        • Labels
        • Categories
        • Persons
        • Organizations
        • Places
        • Events
        • Products
        • Repos
        • Software
      • Collections
      • Feeds
        • Create Feed With Workflow
        • Create RSS Feed
        • Create Podcast Feed
        • Create Web Feed
        • Create Web Search Feed
        • Create Reddit Feed
        • Create Notion Feed
        • Create YouTube Feed
        • User Storage Feeds
          • Create OneDrive Feed
          • Create Google Drive Feed
          • Create SharePoint Feed
        • Cloud Storage Feeds
          • Create Amazon S3 Feed
          • Create Azure Blob Feed
          • Create Azure File Feed
          • Create Google Blob Feed
        • Messaging Feeds
          • Create Slack Feed
          • Create Microsoft Teams Feed
          • Create Discord Feed
        • Email Feeds
          • Create Google Mail Feed
          • Create Microsoft Outlook Feed
        • Issue Feeds
          • Create Linear Feed
          • Create Jira Feed
          • Create GitHub Issues Feed
        • Configuration Options
      • Workflows
        • Ingestion
        • Indexing
        • Preparation
        • Extraction
        • Enrichment
        • Actions
      • Conversations
      • Specifications
        • Azure OpenAI
        • OpenAI
        • Anthropic
        • Mistral
        • Groq
        • Deepseek
        • Replicate
        • Configuration Options
      • Alerts
        • Create Slack Audio Alert
        • Create Slack Text Alert
      • Projects
    • API Changelog
    • Multi-tenant Applications
  • JSON Mode
    • Overview
    • Document JSON
    • Transcript JSON
  • Content Types
    • Files
      • Documents
      • Audio
      • Video
      • Images
      • Animations
      • Data
      • Emails
      • Code
      • Packages
      • Other
    • Web Pages
    • Text
    • Posts
    • Messages
    • Emails
    • Issues
  • Data Sources
    • Feeds
  • Platform
    • Developer Portal
      • Projects
    • Cloud Platform
      • Security
      • Subprocessors
  • Resources
    • Community
Powered by GitBook
On this page
  • Prompt Conversation
  • Get Conversation

Was this helpful?

  1. Graphlit Data API
  2. Quickstart
  3. Explore Content

Prompt Conversation

Here is an example of asking a question about your ingested content:

Mutation:

mutation PromptConversation($prompt: String!, $id: ID) {
  promptConversation(prompt: $prompt, id: $id) {
    conversation {
      id
    }
    message {
      role
      author
      message
      tokens
      completionTime
    }
    messageCount
  }
}

Variables:

{
  "prompt": "Provide a summary of the term 'unstructured data', in 200 words or less."
}

Response:

{
  "conversation": {
    "id": "fc1d1795-1e51-463c-8f83-b60531a94b71"
  },
  "message": {
    "role": "ASSISTANT",
    "message": "Unstructured data refers to any data that does not have a predefined data model or structure. This type of data is typically not organized in a database or spreadsheet, making it difficult to analyze and process using traditional data analysis tools. Examples of unstructured data include text documents, images, audio and video files, social media posts, and sensor data from IoT devices. Unstructured data is often generated in large volumes and at high velocity, making it a challenge to store and manage effectively. However, advances in machine learning and natural language processing have enabled organizations to extract valuable insights from unstructured data, which can be used to improve decision-making and gain a competitive advantage. Effective management and analysis of unstructured data can provide valuable insights into customer behavior, market trends, and other key business metrics, making it a valuable asset for organizations across a range of industries.",
    "tokens": 170,
    "completionTime": "PT4.497279S"
  },
  "messageCount": 2
}

Prompt Conversation

Mutation:

mutation PromptConversation($prompt: String!, $id: ID) {
  promptConversation(prompt: $prompt, id: $id) {
    conversation {
      id
    }
    message {
      role
      author
      message
      tokens
      completionTime
    }
    messageCount
  }
}

Variables:

{
  "prompt": "Sorry I meant, can you provide a summary of the term 'unstructured data' in 50 words or less?",
  "id": "fc1d1795-1e51-463c-8f83-b60531a94b71"
}

Response:

{
  "conversation": {
    "id": "fc1d1795-1e51-463c-8f83-b60531a94b71"
  },
  "message": {
    "role": "ASSISTANT",
    "message": "Unstructured data refers to data that lacks a predefined structure or organization, making it difficult to analyze using traditional data analysis tools. This type of data includes text documents, images, videos, and social media posts, and is often generated in large volumes and at high velocity. Advances in machine learning and natural language processing have enabled organizations to extract valuable insights from unstructured data.",
    "tokens": 74,
    "completionTime": "PT2.5219146S"
  },
  "messageCount": 4
}

Get Conversation

Query:

query GetConversation($id: ID!) {
  conversation(id: $id) {
    id
    name
    creationDate
    state
    owner {
      id
    }
    type
    messages {
      role
      author
      message
      tokens
      completionTime
    }
  }
}

Variables:

{
  "id": "fc1d1795-1e51-463c-8f83-b60531a94b71"
}

Response:

{
  "type": "CONTENT",
  "messages": [
    {
      "role": "USER",
      "message": "Provide a summary of the term 'unstructured data', in 200 words or less.",
      "tokens": 19
    },
    {
      "role": "ASSISTANT",
      "message": "Unstructured data refers to any data that does not have a predefined data model or structure. This type of data is typically not organized in a database or spreadsheet, making it difficult to analyze and process using traditional data analysis tools. Examples of unstructured data include text documents, images, audio and video files, social media posts, and sensor data from IoT devices. Unstructured data is often generated in large volumes and at high velocity, making it a challenge to store and manage effectively. However, advances in machine learning and natural language processing have enabled organizations to extract valuable insights from unstructured data, which can be used to improve decision-making and gain a competitive advantage. Effective management and analysis of unstructured data can provide valuable insights into customer behavior, market trends, and other key business metrics, making it a valuable asset for organizations across a range of industries.",
      "tokens": 170,
      "completionTime": "PT4.497279S"
    },
    {
      "role": "USER",
      "message": "Sorry I meant, can you provide a summary of the term 'unstructured data' in 50 words or less?",
      "tokens": 24
    },
    {
      "role": "ASSISTANT",
      "message": "Unstructured data refers to data that lacks a predefined structure or organization, making it difficult to analyze using traditional data analysis tools. This type of data includes text documents, images, videos, and social media posts, and is often generated in large volumes and at high velocity. Advances in machine learning and natural language processing have enabled organizations to extract valuable insights from unstructured data.",
      "tokens": 74,
      "completionTime": "PT2.5219146S"
    }
  ],
  "id": "fc1d1795-1e51-463c-8f83-b60531a94b71",
  "name": "Provide a summary of the term 'unstructured data', in 200 words or less.",
  "state": "OPENED",
  "creationDate": "2023-07-04T21:02:03Z",
  "owner": {
    "id": "9422b73d-f8d6-4faf-b7a9-152250c862a4"
  }
}

Last updated 1 year ago

Was this helpful?

🚀