mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
docs: update mixedbread integration API and docs (#2805)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-core': minor
|
||||
---
|
||||
|
||||
Update mixedbread integration API and docs
|
||||
@@ -5,7 +5,7 @@ description: Integrate Mixedbread Search with Fumadocs
|
||||
|
||||
## Introduction
|
||||
|
||||
The Mixedbread Integration uses vector search to provide semantic search capabilities for your documentation. It indexes your documentation content into a vector store, enabling users to search using natural language queries and find relevant content based on meaning rather than just keyword matching.
|
||||
The Mixedbread Integration uses vector search to provide semantic search capabilities for your documentation. It indexes your documentation content into a store, enabling users to search using natural language queries and find relevant content based on meaning rather than just keyword matching.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -15,13 +15,13 @@ The Mixedbread Integration uses vector search to provide semantic search capabil
|
||||
2. Navigate to [API Keys](https://platform.mixedbread.com/platform?next=api-keys)
|
||||
3. Create a new API key and store it in your environment variables
|
||||
|
||||
### Create a Vector Store
|
||||
### Create a Store
|
||||
|
||||
To sync your documentation, you'll need to create a vector store:
|
||||
To sync your documentation, you'll need to create a store:
|
||||
|
||||
1. Go to the [Vector Stores](https://platform.mixedbread.com/platform?next=vector-stores) in your Mixedbread dashboard
|
||||
2. Create a new vector store for your documentation
|
||||
3. Copy the vector store ID
|
||||
1. Go to the [Stores](https://platform.mixedbread.com/platform?next=stores) in your Mixedbread dashboard
|
||||
2. Create a new store for your documentation
|
||||
3. Copy the store ID
|
||||
|
||||
### Sync Documentation
|
||||
|
||||
@@ -40,10 +40,10 @@ Configure authentication and sync your documentation:
|
||||
mxbai config keys add YOUR_API_KEY
|
||||
|
||||
# Sync your documentation
|
||||
mxbai vs sync YOUR_VECTOR_STORE_ID "./content/docs"
|
||||
mxbai vs sync YOUR_STORE_ID "./content/docs"
|
||||
```
|
||||
|
||||
The CLI will automatically detect changes in your documentation and update the vector store accordingly.
|
||||
The CLI will automatically detect changes in your documentation and update the store accordingly.
|
||||
|
||||
### Workflow
|
||||
|
||||
@@ -52,7 +52,7 @@ You can automatically sync your documentation by adding a sync script to your `p
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"build": "... && mxbai vs sync YOUR_VECTOR_STORE_ID './content/docs' --ci"
|
||||
"build": "... && mxbai vs sync YOUR_STORE_ID './content/docs' --ci"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ description: Using Mixedbread with Fumadocs UI.
|
||||
|
||||
1. Integrate [Mixedbread Search](/docs/headless/search/mixedbread).
|
||||
|
||||
2. Create a search dialog, replace `apiKey` and `vectorStoreId` with your desired values.
|
||||
2. Create a search dialog, update `apiKey` and `storeIdentifier` with your desired values.
|
||||
|
||||
<include meta='title="components/search.tsx"'>./mixedbread.tsx</include>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function CustomSearchDialog(props: SharedProps) {
|
||||
const { search, setSearch, query } = useDocsSearch({
|
||||
type: 'mixedbread',
|
||||
client,
|
||||
vectorStoreId: 'vectorStoreId',
|
||||
storeIdentifier: 'your_store_identifier',
|
||||
locale,
|
||||
});
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
"zod": "^4.2.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@mixedbread/sdk": "^0.19.0",
|
||||
"@mixedbread/sdk": "^0.46.0",
|
||||
"@orama/core": "1.x.x",
|
||||
"@tanstack/react-router": "1.x.x",
|
||||
"@types/react": "*",
|
||||
|
||||
@@ -6,9 +6,9 @@ import type { StoreSearchResponse } from '@mixedbread/sdk/resources/stores';
|
||||
|
||||
export interface MixedbreadOptions {
|
||||
/**
|
||||
* The ID of the vector store to search in
|
||||
* The identifier of the store to search in
|
||||
*/
|
||||
vectorStoreId: string;
|
||||
storeIdentifier: string;
|
||||
|
||||
/**
|
||||
* The Mixedbread SDK client instance
|
||||
@@ -63,7 +63,7 @@ export async function search(
|
||||
query: string,
|
||||
options: MixedbreadOptions,
|
||||
): Promise<SortedResult[]> {
|
||||
const { client, vectorStoreId, tag } = options;
|
||||
const { client, storeIdentifier, tag } = options;
|
||||
|
||||
if (!query.trim()) {
|
||||
return [];
|
||||
@@ -71,7 +71,7 @@ export async function search(
|
||||
|
||||
const res = await client.stores.search({
|
||||
query,
|
||||
store_identifiers: [vectorStoreId],
|
||||
store_identifiers: [storeIdentifier],
|
||||
top_k: 10,
|
||||
filters: {
|
||||
key: 'generated_metadata.tag',
|
||||
|
||||
Reference in New Issue
Block a user