|
66 | 66 | externalDocs: |
67 | 67 | description: Find out more |
68 | 68 | 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 | + |
70 | 75 | /collections: |
71 | 76 | get: |
72 | 77 | tags: |
@@ -1734,7 +1739,7 @@ paths: |
1734 | 1739 | schema: |
1735 | 1740 | $ref: '#/components/schemas/PresetSchema' |
1736 | 1741 | '400': |
1737 | | - description: Bad request, see error message for details. |
| 1742 | + description: Bad request, see error message for details |
1738 | 1743 | content: |
1739 | 1744 | application/json: |
1740 | 1745 | schema: |
@@ -1857,6 +1862,141 @@ paths: |
1857 | 1862 | application/json: |
1858 | 1863 | schema: |
1859 | 1864 | $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 | + |
1860 | 2000 | components: |
1861 | 2001 | schemas: |
1862 | 2002 | CollectionSchema: |
@@ -2631,6 +2771,14 @@ components: |
2631 | 2771 | against. Multiple fields are separated with a comma. |
2632 | 2772 | type: string |
2633 | 2773 |
|
| 2774 | + nl_query: |
| 2775 | + description: Whether to use natural language processing to parse the query. |
| 2776 | + type: boolean |
| 2777 | + |
| 2778 | + nl_model_id: |
| 2779 | + description: The ID of the natural language model to use. |
| 2780 | + type: string |
| 2781 | + |
2634 | 2782 | query_by_weights: |
2635 | 2783 | description: |
2636 | 2784 | The relative weight to give each `query_by` field when ranking results. |
@@ -3783,6 +3931,98 @@ components: |
3783 | 3931 | type: string |
3784 | 3932 | description: The root form of the word |
3785 | 3933 | example: person |
| 3934 | + NLSearchModelBase: |
| 3935 | + type: object |
| 3936 | + properties: |
| 3937 | + model_name: |
| 3938 | + type: string |
| 3939 | + description: Name of the NL model to use |
| 3940 | + api_key: |
| 3941 | + type: string |
| 3942 | + description: API key for the NL model service |
| 3943 | + api_url: |
| 3944 | + type: string |
| 3945 | + description: Custom API URL for the NL model service |
| 3946 | + max_bytes: |
| 3947 | + type: integer |
| 3948 | + description: Maximum number of bytes to process |
| 3949 | + temperature: |
| 3950 | + type: number |
| 3951 | + description: Temperature parameter for the NL model |
| 3952 | + system_prompt: |
| 3953 | + type: string |
| 3954 | + description: System prompt for the NL model |
| 3955 | + top_p: |
| 3956 | + type: number |
| 3957 | + description: Top-p parameter for the NL model (Google-specific) |
| 3958 | + top_k: |
| 3959 | + type: integer |
| 3960 | + description: Top-k parameter for the NL model (Google-specific) |
| 3961 | + stop_sequences: |
| 3962 | + type: array |
| 3963 | + items: |
| 3964 | + type: string |
| 3965 | + description: Stop sequences for the NL model (Google-specific) |
| 3966 | + api_version: |
| 3967 | + type: string |
| 3968 | + description: API version for the NL model service |
| 3969 | + project_id: |
| 3970 | + type: string |
| 3971 | + description: Project ID for GCP Vertex AI |
| 3972 | + access_token: |
| 3973 | + type: string |
| 3974 | + description: Access token for GCP Vertex AI |
| 3975 | + refresh_token: |
| 3976 | + type: string |
| 3977 | + description: Refresh token for GCP Vertex AI |
| 3978 | + client_id: |
| 3979 | + type: string |
| 3980 | + description: Client ID for GCP Vertex AI |
| 3981 | + client_secret: |
| 3982 | + type: string |
| 3983 | + description: Client secret for GCP Vertex AI |
| 3984 | + region: |
| 3985 | + type: string |
| 3986 | + description: Region for GCP Vertex AI |
| 3987 | + max_output_tokens: |
| 3988 | + type: integer |
| 3989 | + description: Maximum output tokens for GCP Vertex AI |
| 3990 | + account_id: |
| 3991 | + type: string |
| 3992 | + description: Account ID for Cloudflare-specific models |
| 3993 | + |
| 3994 | + NLSearchModelCreateSchema: |
| 3995 | + allOf: |
| 3996 | + - $ref: '#/components/schemas/NLSearchModelBase' |
| 3997 | + - type: object |
| 3998 | + properties: |
| 3999 | + id: |
| 4000 | + type: string |
| 4001 | + description: Optional ID for the NL search model |
| 4002 | + |
| 4003 | + NLSearchModelSchema: |
| 4004 | + allOf: |
| 4005 | + - $ref: '#/components/schemas/NLSearchModelCreateSchema' |
| 4006 | + - type: object |
| 4007 | + required: |
| 4008 | + - id |
| 4009 | + properties: |
| 4010 | + id: |
| 4011 | + type: string |
| 4012 | + description: ID of the NL search model |
| 4013 | + |
| 4014 | + NLSearchModelUpdateSchema: |
| 4015 | + $ref: '#/components/schemas/NLSearchModelCreateSchema' |
| 4016 | + |
| 4017 | + NLSearchModelDeleteSchema: |
| 4018 | + type: object |
| 4019 | + required: |
| 4020 | + - id |
| 4021 | + properties: |
| 4022 | + id: |
| 4023 | + type: string |
| 4024 | + description: ID of the deleted NL search model |
| 4025 | + |
3786 | 4026 | securitySchemes: |
3787 | 4027 | api_key_header: |
3788 | 4028 | type: apiKey |
|
0 commit comments