Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/server/server-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3972,6 +3972,14 @@ server_response_reader server_context::get_response_reader() {
return impl->get_response_reader();
}

float server_context::get_slot_prompt_similarity() const {
return impl->slot_prompt_similarity;
}

void server_context::set_slot_prompt_similarity(float value) {
impl->slot_prompt_similarity = value;
}

server_context_meta server_context::get_meta() const {
auto bos_id = llama_vocab_bos(impl->vocab);
auto eos_id = llama_vocab_eos(impl->vocab);
Expand Down
5 changes: 5 additions & 0 deletions tools/server/server-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ struct server_context {
// not thread-safe, should only be used from the main thread
server_context_meta get_meta() const;

// get/set the slot-prompt-similarity threshold for slot selection
// not thread-safe, should only be used from the main thread
float get_slot_prompt_similarity() const;
void set_slot_prompt_similarity(float value);

// note: must be set before load_model() is called
void set_state_callback(server_state_callback_t callback);
};
Expand Down