trieve_client/models/recommend_type.rs
1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// RecommendType : The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.
14/// The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum RecommendType {
17 #[serde(rename = "semantic")]
18 Semantic,
19 #[serde(rename = "fulltext")]
20 Fulltext,
21 #[serde(rename = "bm25")]
22 Bm25,
23
24}
25
26impl ToString for RecommendType {
27 fn to_string(&self) -> String {
28 match self {
29 Self::Semantic => String::from("semantic"),
30 Self::Fulltext => String::from("fulltext"),
31 Self::Bm25 => String::from("bm25"),
32 }
33 }
34}
35
36impl Default for RecommendType {
37 fn default() -> RecommendType {
38 Self::Semantic
39 }
40}
41