devflowinc / trieve

All-in-one infrastructure for search, recommendations, RAG, and analytics offered via API
https://dashboard.trieve.ai
Other
1.44k stars 123 forks source link

feature: style req method verbs for docsearch when an openapi spec is included in the scrape #2493

Closed skeptrunedev closed 18 hours ago

skeptrunedev commented 3 days ago

Description

Create a new dataset with the following crawl config:

"crawl_options": {
    "site_url": "https://docs.trieve.ai/api-reference",
    "include_paths": [
        "/api-reference/*"
    ],
    "openapi_options": {
        "openapi_schema_url": "https://api.trieve.ai/api-docs/openapi.json",
        "openapi_tag": "api-reference"
    }
}

Chunks from that dataset will have chunk_html values with a heading that looks like: <h2><span class="openapi-method">POST</span>. There should be a style that applies to .openapi-method classes depending on the containing verb text similar to how Mintlify does it:

image

Target(s)

docsearch

Requirement to close

PR which adds styling

Community channels

Matrix is preferred. Reach out on discord or Matrix for further assistance.