Skip to content

Commit a9bc510

Browse files
committed
v29: add nl-language endpoints
1 parent 09eefc0 commit a9bc510

File tree

1 file changed

+234
-2
lines changed

1 file changed

+234
-2
lines changed

openapi.yml

Lines changed: 234 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ tags:
6666
externalDocs:
6767
description: Find out more
6868
url: https://typesense.org/docs/28.0/api/stemming.html
69-
paths:
69+
- name: nl_search_models
70+
description: Manage NL search models
71+
externalDocs:
72+
description: Find out more
73+
url: https://typesense.org/docs/29.0/api/natural-language-search.html
74+
7075
/collections:
7176
get:
7277
tags:
@@ -1734,7 +1739,7 @@ paths:
17341739
schema:
17351740
$ref: '#/components/schemas/PresetSchema'
17361741
'400':
1737-
description: Bad request, see error message for details.
1742+
description: Bad request, see error message for details
17381743
content:
17391744
application/json:
17401745
schema:
@@ -1857,6 +1862,141 @@ paths:
18571862
application/json:
18581863
schema:
18591864
$ref: "#/components/schemas/ApiResponse"
1865+
/nl_search_models:
1866+
get:
1867+
tags:
1868+
- nl_search_models
1869+
summary: List all NL search models
1870+
description: Retrieve all NL search models.
1871+
operationId: retrieveAllNLSearchModels
1872+
responses:
1873+
'200':
1874+
description: List of all NL search models
1875+
content:
1876+
application/json:
1877+
schema:
1878+
type: array
1879+
items:
1880+
$ref: '#/components/schemas/NLSearchModelSchema'
1881+
post:
1882+
tags:
1883+
- nl_search_models
1884+
summary: Create a NL search model
1885+
description: Create a new NL search model.
1886+
operationId: createNLSearchModel
1887+
requestBody:
1888+
description: The NL search model to be created
1889+
content:
1890+
application/json:
1891+
schema:
1892+
$ref: '#/components/schemas/NLSearchModelCreateSchema'
1893+
required: true
1894+
responses:
1895+
'201':
1896+
description: NL search model successfully created
1897+
content:
1898+
application/json:
1899+
schema:
1900+
$ref: '#/components/schemas/NLSearchModelSchema'
1901+
'400':
1902+
description: Bad request, see error message for details
1903+
content:
1904+
application/json:
1905+
schema:
1906+
$ref: '#/components/schemas/ApiResponse'
1907+
/nl_search_models/{modelId}:
1908+
get:
1909+
tags:
1910+
- nl_search_models
1911+
summary: Retrieve a NL search model
1912+
description: Retrieve a specific NL search model by its ID.
1913+
operationId: retrieveNLSearchModel
1914+
parameters:
1915+
- name: modelId
1916+
in: path
1917+
description: The ID of the NL search model to retrieve
1918+
required: true
1919+
schema:
1920+
type: string
1921+
responses:
1922+
'200':
1923+
description: NL search model fetched
1924+
content:
1925+
application/json:
1926+
schema:
1927+
$ref: '#/components/schemas/NLSearchModelSchema'
1928+
'404':
1929+
description: NL search model not found
1930+
content:
1931+
application/json:
1932+
schema:
1933+
$ref: '#/components/schemas/ApiResponse'
1934+
put:
1935+
tags:
1936+
- nl_search_models
1937+
summary: Update a NL search model
1938+
description: Update an existing NL search model.
1939+
operationId: updateNLSearchModel
1940+
parameters:
1941+
- name: modelId
1942+
in: path
1943+
description: The ID of the NL search model to update
1944+
required: true
1945+
schema:
1946+
type: string
1947+
requestBody:
1948+
description: The NL search model fields to update
1949+
content:
1950+
application/json:
1951+
schema:
1952+
$ref: '#/components/schemas/NLSearchModelUpdateSchema'
1953+
required: true
1954+
responses:
1955+
'200':
1956+
description: NL search model successfully updated
1957+
content:
1958+
application/json:
1959+
schema:
1960+
$ref: '#/components/schemas/NLSearchModelSchema'
1961+
'400':
1962+
description: Bad request, see error message for details
1963+
content:
1964+
application/json:
1965+
schema:
1966+
$ref: '#/components/schemas/ApiResponse'
1967+
'404':
1968+
description: NL search model not found
1969+
content:
1970+
application/json:
1971+
schema:
1972+
$ref: '#/components/schemas/ApiResponse'
1973+
delete:
1974+
tags:
1975+
- nl_search_models
1976+
summary: Delete a NL search model
1977+
description: Delete a specific NL search model by its ID.
1978+
operationId: deleteNLSearchModel
1979+
parameters:
1980+
- name: modelId
1981+
in: path
1982+
description: The ID of the NL search model to delete
1983+
required: true
1984+
schema:
1985+
type: string
1986+
responses:
1987+
'200':
1988+
description: NL search model successfully deleted
1989+
content:
1990+
application/json:
1991+
schema:
1992+
$ref: '#/components/schemas/NLSearchModelDeleteSchema'
1993+
'404':
1994+
description: NL search model not found
1995+
content:
1996+
application/json:
1997+
schema:
1998+
$ref: '#/components/schemas/ApiResponse'
1999+
18602000
components:
18612001
schemas:
18622002
CollectionSchema:
@@ -3783,6 +3923,98 @@ components:
37833923
type: string
37843924
description: The root form of the word
37853925
example: person
3926+
NLSearchModelBase:
3927+
type: object
3928+
properties:
3929+
model_name:
3930+
type: string
3931+
description: Name of the NL model to use
3932+
api_key:
3933+
type: string
3934+
description: API key for the NL model service
3935+
api_url:
3936+
type: string
3937+
description: Custom API URL for the NL model service
3938+
max_bytes:
3939+
type: integer
3940+
description: Maximum number of bytes to process
3941+
temperature:
3942+
type: number
3943+
description: Temperature parameter for the NL model
3944+
system_prompt:
3945+
type: string
3946+
description: System prompt for the NL model
3947+
top_p:
3948+
type: number
3949+
description: Top-p parameter for the NL model (Google-specific)
3950+
top_k:
3951+
type: integer
3952+
description: Top-k parameter for the NL model (Google-specific)
3953+
stop_sequences:
3954+
type: array
3955+
items:
3956+
type: string
3957+
description: Stop sequences for the NL model (Google-specific)
3958+
api_version:
3959+
type: string
3960+
description: API version for the NL model service
3961+
project_id:
3962+
type: string
3963+
description: Project ID for GCP Vertex AI
3964+
access_token:
3965+
type: string
3966+
description: Access token for GCP Vertex AI
3967+
refresh_token:
3968+
type: string
3969+
description: Refresh token for GCP Vertex AI
3970+
client_id:
3971+
type: string
3972+
description: Client ID for GCP Vertex AI
3973+
client_secret:
3974+
type: string
3975+
description: Client secret for GCP Vertex AI
3976+
region:
3977+
type: string
3978+
description: Region for GCP Vertex AI
3979+
max_output_tokens:
3980+
type: integer
3981+
description: Maximum output tokens for GCP Vertex AI
3982+
account_id:
3983+
type: string
3984+
description: Account ID for Cloudflare-specific models
3985+
3986+
NLSearchModelCreateSchema:
3987+
allOf:
3988+
- $ref: '#/components/schemas/NLSearchModelBase'
3989+
- type: object
3990+
properties:
3991+
id:
3992+
type: string
3993+
description: Optional ID for the NL search model
3994+
3995+
NLSearchModelSchema:
3996+
allOf:
3997+
- $ref: '#/components/schemas/NLSearchModelCreateSchema'
3998+
- type: object
3999+
required:
4000+
- id
4001+
properties:
4002+
id:
4003+
type: string
4004+
description: ID of the NL search model
4005+
4006+
NLSearchModelUpdateSchema:
4007+
$ref: '#/components/schemas/NLSearchModelCreateSchema'
4008+
4009+
NLSearchModelDeleteSchema:
4010+
type: object
4011+
required:
4012+
- id
4013+
properties:
4014+
id:
4015+
type: string
4016+
description: ID of the deleted NL search model
4017+
37864018
securitySchemes:
37874019
api_key_header:
37884020
type: apiKey

0 commit comments

Comments
 (0)