pub struct UpdateCustomKnowledgeBaseDto {
pub server: Option<Server>,
}
Fields§
§server: Option<Server>
This is where the knowledge base request will be sent. Request Example: POST https://{server.url} Content-Type: application/json { "messsage": { "type": "knowledge-base-request", "messages": [ { "role": "user", "content": "Why is ocean blue?" } ], …other metadata about the call… } } Response Expected: { \"message\": { \"role\": \"assistant\", \"content\": \"The ocean is blue because water absorbs everything but blue.\", }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK \"documents\": [ { \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\", \"similarity\": 1 }, { \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\", \"similarity\": .5 } ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL }
Implementations§
Source§impl UpdateCustomKnowledgeBaseDto
impl UpdateCustomKnowledgeBaseDto
pub fn new() -> UpdateCustomKnowledgeBaseDto
Trait Implementations§
Source§impl Clone for UpdateCustomKnowledgeBaseDto
impl Clone for UpdateCustomKnowledgeBaseDto
Source§fn clone(&self) -> UpdateCustomKnowledgeBaseDto
fn clone(&self) -> UpdateCustomKnowledgeBaseDto
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UpdateCustomKnowledgeBaseDto
impl Debug for UpdateCustomKnowledgeBaseDto
Source§impl Default for UpdateCustomKnowledgeBaseDto
impl Default for UpdateCustomKnowledgeBaseDto
Source§fn default() -> UpdateCustomKnowledgeBaseDto
fn default() -> UpdateCustomKnowledgeBaseDto
Source§impl<'de> Deserialize<'de> for UpdateCustomKnowledgeBaseDto
impl<'de> Deserialize<'de> for UpdateCustomKnowledgeBaseDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UpdateCustomKnowledgeBaseDto
impl PartialEq for UpdateCustomKnowledgeBaseDto
Source§fn eq(&self, other: &UpdateCustomKnowledgeBaseDto) -> bool
fn eq(&self, other: &UpdateCustomKnowledgeBaseDto) -> bool
self
and other
values to be equal, and is used by ==
.