deepseek Integration Documentation
Overview
The deepseek Integration for the Vantage analytics and data platform provides seamless interaction with the Deepseek API. This integration facilitates powerful functionalities such as chat completions and the generation of summaries for dashboard tiles. By utilizing data-driven insights, deepseek enhances user experience by offering detailed analyses and summaries, thereby facilitating better data comprehension.
For further details, refer to the Deepseek API Documentation.
Settings
The deepseek integration comprises several configuration settings that tailor its behavior according to user needs. Below is a detailed breakdown of each setting.
1. API Key
- Name:
apiKey - Input Type: String
- Description: The API key required for authenticating calls to the Deepseek API. This key is essential for making any request to the API. If not provided, subsequent API calls will be rejected, leading to authentication errors.
- Default Value:
null(Must be configured)
2. Model
- Name:
model - Input Type: String
- Description: This setting allows the user to specify which Deepseek model to use for generating chat completions and insights. Changing this value will influence the type of responses generated by the API. For example,
deepseek-chatis optimized for conversational purposes, whiledeepseek-codermay be more suited for coding-related queries. - Default Value:
deepseek-chat
3. Max Tokens
- Name:
maxTokens - Input Type: Numeric
- Description: This setting specifies the maximum number of tokens (words and symbols) that Deepseek can return in a single response. Adjusting this affects the verbosity of the responses; lower values yield shorter, more concise replies, while higher values enable more detailed outputs.
- Default Value:
500(for chat completions)
4. Temperature
- Name:
temperature - Input Type: Numeric (Range: 0-2)
- Description: This parameter controls the randomness of responses generated by the Deepseek models. A lower temperature (e.g., 0.2) results in more deterministic and consistent outputs, while a higher temperature (close to 2) leads to more diverse and creative responses. Adjusting this allows users to tailor the creativity of the AI's responses.
- Default Value:
0.7
5. Streaming
- Name:
stream - Input Type: Boolean
- Description: This setting determines whether responses should be streamed in real-time or delivered as a whole after processing. If set to true, responses can be received incrementally, providing a more interactive experience.
- Default Value:
false
How It Works
The deepseek integration operates by first authenticating with the Deepseek API using a Bearer token paradigm encapsulated in the authorize function. This process is crucial for ensuring secure API interactions.
Once authenticated, users can leverage various methods:
-
Chat Completion: Invoking the
chatCompletionmethod allows users to send messages to the model, which processes and returns a response based on the provided context. Users can specify parameters such as model type, max tokens, and temperature. -
Streaming Chat Completion: For scenarios requiring real-time interaction, the
streamChatCompletionmethod allows users to receive ongoing responses from the API. It utilizes aReadableStreamto progressively deliver the content. -
Tile Summary Generation: The system can analyze dashboard tiles through the
generateTileSummarymethod, summarizing insights and trends based on the given dataset. Users can provide titles, types, data, and contextual information to refine the summary generated. -
Dashboard Summary: The
generateDashboardSummarymethod compiles insights across multiple tiles, presenting a holistic view of the data showcased in the dashboard.
Data Expectations
The integration expects well-structured data in JSON format corresponding to the specific functionality being utilized. For chat completion, block messages must be structured as:
[
{"role": "user", "content": "Your message"},
{"role": "assistant", "content": "Model's reply"}
]For tile summaries and dashboard summaries, the respective data must reflect the structure of visualization types, including arrays of data points or statistics.
Use Cases & Examples
Use Case 1: Customer Support Automation
Organizations can use the deepseek integration to automate customer support through conversational agents that provide instant responses based on user queries.
Use Case 2: Data Insights Generation
Data analysts may leverage deepseek to turn complex datasets into easily digestible summaries, aiding in strategic business decision-making.
Configuration Example (Use Case 2)
In a scenario where a business dashboard presents sales data, a user might configure deepseek to generate insights as follows:
{
"tileTitle": "Monthly Sales Overview",
"tileType": "bar",
"tileData": [
{"month": "January", "sales": 1000},
{"month": "February", "sales": 1500},
{"month": "March", "sales": 2000}
],
"context": "Provide insights on monthly sales trends.",
"userQuestion": "What patterns can we observe in the sales data?"
}By passing this configuration to the generateTileSummary() method, the user will receive a structured analysis highlighting key performance indicators, trends, and recommendations based on their input data.
AI Integrations
The deepseek integration employs AI-driven capabilities to automate summarizing and generating insights, offering unique responses tailored to the provided data and user interaction history. By integrating with advanced models, it enhances decision-making through data-driven insights.
Billing Implications
Using the deepseek integration may incur costs based on API usage. Factors such as the number of requests made, tokens processed, and streaming options may contribute to the overall billing. It is essential for users to monitor their API consumption and adjust parameters (like maxTokens) to optimize costs effectively. The precise pricing details can be accessed through the Deepseek API documentation.