SYMBOL INDEX (930 symbols across 47 files) FILE: src/cli.rs type Cli (line 8) | pub struct Cli { method text (line 90) | pub fn text(&self) -> Result> { FILE: src/client/access_token.rs function get_access_token (line 10) | pub fn get_access_token(client_name: &str) -> Result { function is_valid_access_token (line 18) | pub fn is_valid_access_token(client_name: &str) -> bool { function set_access_token (line 27) | pub fn set_access_token(client_name: &str, token: String, expires_at: i6... FILE: src/client/azure_openai.rs type AzureOpenAIConfig (line 8) | pub struct AzureOpenAIConfig { constant PROMPTS (line 22) | pub const PROMPTS: [PromptAction<'static>; 2] = [ function prepare_chat_completions (line 43) | fn prepare_chat_completions( function prepare_embeddings (line 65) | fn prepare_embeddings(self_: &AzureOpenAIClient, data: &EmbeddingsData) ... FILE: src/client/bedrock.rs type BedrockConfig (line 17) | pub struct BedrockConfig { constant PROMPTS (line 35) | pub const PROMPTS: [PromptAction<'static>; 3] = [ method chat_completions_builder (line 41) | fn chat_completions_builder( method embeddings_builder (line 92) | fn embeddings_builder( method chat_completions_inner (line 150) | async fn chat_completions_inner( method chat_completions_streaming_inner (line 159) | async fn chat_completions_streaming_inner( method embeddings_inner (line 169) | async fn embeddings_inner( function chat_completions (line 179) | async fn chat_completions(builder: RequestBuilder) -> Result Result { type EmbeddingsResBody (line 317) | struct EmbeddingsResBody { function build_chat_completions_body (line 321) | fn build_chat_completions_body(data: ChatCompletionsData, model: &Model)... function extract_chat_completions (line 480) | fn extract_chat_completions(data: &Value) -> Result; 1] = [("api_key", "API Key", ... function prepare_chat_completions (line 41) | fn prepare_chat_completions( function claude_chat_completions (line 61) | pub async fn claude_chat_completions( function claude_chat_completions_streaming (line 75) | pub async fn claude_chat_completions_streaming( function claude_build_chat_completions_body (line 156) | pub fn claude_build_chat_completions_body( function claude_extract_chat_completions (line 300) | pub fn claude_extract_chat_completions(data: &Value) -> Result; 1] = [("api_key", "API Key", ... function prepare_chat_completions (line 41) | fn prepare_chat_completions( function prepare_embeddings (line 65) | fn prepare_embeddings(self_: &CohereClient, data: &EmbeddingsData) -> Re... function prepare_rerank (line 92) | fn prepare_rerank(self_: &CohereClient, data: &RerankData) -> Result Result Result &GlobalConfig; method extra_config (line 41) | fn extra_config(&self) -> Option<&ExtraConfig>; method patch_config (line 43) | fn patch_config(&self) -> Option<&RequestPatch>; method name (line 45) | fn name(&self) -> &str; method model (line 47) | fn model(&self) -> &Model; method model_mut (line 49) | fn model_mut(&mut self) -> &mut Model; method build_client (line 51) | fn build_client(&self) -> Result { method chat_completions (line 68) | async fn chat_completions(&self, input: Input) -> Result Result Result { method chat_completions_inner (line 122) | async fn chat_completions_inner( method chat_completions_streaming_inner (line 128) | async fn chat_completions_streaming_inner( method embeddings_inner (line 135) | async fn embeddings_inner( method rerank_inner (line 143) | async fn rerank_inner( method request_builder (line 151) | fn request_builder( method patch_request_data (line 160) | fn patch_request_data(&self, request_data: &mut RequestData) { method default (line 195) | fn default() -> Self { type ExtraConfig (line 201) | pub struct ExtraConfig { type RequestPatch (line 207) | pub struct RequestPatch { type ApiPatch (line 213) | pub type ApiPatch = IndexMap; type RequestData (line 215) | pub struct RequestData { method new (line 222) | pub fn new(url: T, body: Value) -> Self method bearer_auth (line 233) | pub fn bearer_auth(&mut self, auth: T) method header (line 241) | pub fn header(&mut self, key: K, value: V) method into_builder (line 249) | pub fn into_builder(self, client: &ReqwestClient) -> RequestBuilder { method apply_patch (line 261) | pub fn apply_patch(&mut self, patch: Value) { type ChatCompletionsData (line 281) | pub struct ChatCompletionsData { type ChatCompletionsOutput (line 290) | pub struct ChatCompletionsOutput { method new (line 299) | pub fn new(text: &str) -> Self { type EmbeddingsData (line 308) | pub struct EmbeddingsData { method new (line 314) | pub fn new(texts: Vec, query: bool) -> Self { type EmbeddingsOutput (line 319) | pub type EmbeddingsOutput = Vec>; type RerankData (line 322) | pub struct RerankData { method new (line 329) | pub fn new(query: String, documents: Vec, top_n: usize) -> Self { type RerankOutput (line 338) | pub type RerankOutput = Vec; type RerankResult (line 341) | pub struct RerankResult { type PromptAction (line 346) | pub type PromptAction<'a> = (&'a str, &'a str, Option<&'a str>); function create_config (line 348) | pub async fn create_config( function create_openai_compatible_client_config (line 368) | pub async fn create_openai_compatible_client_config( function call_chat_completions (line 406) | pub async fn call_chat_completions( function call_chat_completions_streaming (line 441) | pub async fn call_chat_completions_streaming( function noop_prepare_embeddings (line 477) | pub fn noop_prepare_embeddings(_client: &T, _data: &EmbeddingsData) -... function noop_embeddings (line 481) | pub async fn noop_embeddings(_builder: RequestBuilder, _model: &Model) -... function noop_prepare_rerank (line 485) | pub fn noop_prepare_rerank(_client: &T, _data: &RerankData) -> Result... function noop_rerank (line 489) | pub async fn noop_rerank(_builder: RequestBuilder, _model: &Model) -> Re... function catch_error (line 493) | pub fn catch_error(data: &Value, status: u16) -> Result<()> { function json_str_from_map (line 535) | pub fn json_str_from_map<'a>( function set_client_models_config (line 542) | async fn set_client_models_config(client_config: &mut Value, client: &st... function select_model (line 645) | fn select_model(model_names: Vec) -> Result { function prompt_input_string (line 657) | fn prompt_input_string( FILE: src/client/gemini.rs constant API_BASE (line 9) | const API_BASE: &str = "https://generativelanguage.googleapis.com/v1beta"; type GeminiConfig (line 12) | pub struct GeminiConfig { constant PROMPTS (line 26) | pub const PROMPTS: [PromptAction<'static>; 1] = [("api_key", "API Key", ... function prepare_chat_completions (line 40) | fn prepare_chat_completions( function prepare_embeddings (line 70) | fn prepare_embeddings(self_: &GeminiClient, data: &EmbeddingsData) -> Re... function embeddings (line 111) | async fn embeddings(builder: RequestBuilder, _model: &Model) -> Result Self { method merge_system (line 27) | pub fn merge_system(&mut self, system: MessageContent) { method default (line 14) | fn default() -> Self { type MessageRole (line 57) | pub enum MessageRole { method is_system (line 66) | pub fn is_system(&self) -> bool { method is_user (line 70) | pub fn is_user(&self) -> bool { method is_assistant (line 74) | pub fn is_assistant(&self) -> bool { type MessageContent (line 81) | pub enum MessageContent { method render_input (line 89) | pub fn render_input( method merge_prompt (line 136) | pub fn merge_prompt(&mut self, replace_fn: impl Fn(&str) -> String) { method to_text (line 152) | pub fn to_text(&self) -> String { type MessageContentPart (line 171) | pub enum MessageContentPart { type ImageUrl (line 177) | pub struct ImageUrl { type MessageContentToolCalls (line 182) | pub struct MessageContentToolCalls { method new (line 189) | pub fn new(tool_results: Vec, text: String) -> Self { method merge (line 197) | pub fn merge(&mut self, tool_results: Vec, _text: String) { function patch_messages (line 204) | pub fn patch_messages(messages: &mut Vec, model: &Model) { function extract_system_message (line 229) | pub fn extract_system_message(messages: &mut Vec) -> Option Self { method from_config (line 38) | pub fn from_config(client_name: &str, models: &[ModelData]) -> Vec String { method client_name (line 99) | pub fn client_name(&self) -> &str { method name (line 103) | pub fn name(&self) -> &str { method real_name (line 107) | pub fn real_name(&self) -> &str { method model_type (line 111) | pub fn model_type(&self) -> ModelType { method data (line 121) | pub fn data(&self) -> &ModelData { method data_mut (line 125) | pub fn data_mut(&mut self) -> &mut ModelData { method description (line 129) | pub fn description(&self) -> String { method patch (line 177) | pub fn patch(&self) -> Option<&Value> { method max_input_tokens (line 181) | pub fn max_input_tokens(&self) -> Option { method max_output_tokens (line 185) | pub fn max_output_tokens(&self) -> Option { method no_stream (line 189) | pub fn no_stream(&self) -> bool { method no_system_message (line 193) | pub fn no_system_message(&self) -> bool { method system_prompt_prefix (line 197) | pub fn system_prompt_prefix(&self) -> Option<&str> { method max_tokens_per_chunk (line 201) | pub fn max_tokens_per_chunk(&self) -> Option { method default_chunk_size (line 205) | pub fn default_chunk_size(&self) -> usize { method max_batch_size (line 209) | pub fn max_batch_size(&self) -> Option { method max_tokens_param (line 213) | pub fn max_tokens_param(&self) -> Option { method set_max_tokens (line 221) | pub fn set_max_tokens( method messages_tokens (line 234) | pub fn messages_tokens(&self, messages: &[Message]) -> usize { method total_tokens (line 271) | pub fn total_tokens(&self, messages: &[Message]) -> usize { method guard_max_input_tokens (line 284) | pub fn guard_max_input_tokens(&self, messages: &[Message]) -> Result<(... method default (line 25) | fn default() -> Self { type ModelData (line 296) | pub struct ModelData { method new (line 337) | pub fn new(name: &str) -> Self { type ProviderModels (line 347) | pub struct ProviderModels { function default_model_type (line 352) | fn default_model_type() -> String { type ModelType (line 357) | pub enum ModelType { method can_create_from_name (line 374) | pub fn can_create_from_name(self) -> bool { method api_name (line 382) | pub fn api_name(self) -> &'static str { method extract_patch (line 390) | pub fn extract_patch(self, patch: &RequestPatch) -> Option<&ApiPatch> { method fmt (line 364) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { function stringify_option_value (line 399) | fn stringify_option_value(value: &Option) -> String FILE: src/client/openai.rs constant API_BASE (line 10) | const API_BASE: &str = "https://api.openai.com/v1"; type OpenAIConfig (line 13) | pub struct OpenAIConfig { constant PROMPTS (line 28) | pub const PROMPTS: [PromptAction<'static>; 1] = [("api_key", "API Key", ... function prepare_chat_completions (line 42) | fn prepare_chat_completions( function prepare_embeddings (line 65) | fn prepare_embeddings(self_: &OpenAIClient, data: &EmbeddingsData) -> Re... function openai_chat_completions (line 85) | pub async fn openai_chat_completions( function openai_chat_completions_streaming (line 100) | pub async fn openai_chat_completions_streaming( function openai_embeddings (line 200) | pub async fn openai_embeddings( type EmbeddingsResBody (line 217) | struct EmbeddingsResBody { type EmbeddingsResBodyEmbedding (line 222) | struct EmbeddingsResBodyEmbedding { function openai_build_chat_completions_body (line 226) | pub fn openai_build_chat_completions_body(data: ChatCompletionsData, mod... function openai_build_embeddings_body (line 346) | pub fn openai_build_embeddings_body(data: &EmbeddingsData, model: &Model... function openai_extract_chat_completions (line 353) | pub fn openai_extract_chat_completions(data: &Value) -> Result Option { FILE: src/client/openai_compatible.rs type OpenAICompatibleConfig (line 10) | pub struct OpenAICompatibleConfig { constant PROMPTS (line 24) | pub const PROMPTS: [PromptAction<'static>; 0] = []; function prepare_chat_completions (line 38) | fn prepare_chat_completions( function prepare_embeddings (line 58) | fn prepare_embeddings( function prepare_rerank (line 78) | fn prepare_rerank(self_: &OpenAICompatibleClient, data: &RerankData) -> ... function get_api_base_ext (line 99) | fn get_api_base_ext(self_: &OpenAICompatibleClient) -> Result { function generic_rerank (line 120) | pub async fn generic_rerank(builder: RequestBuilder, _model: &Model) -> ... type GenericRerankResBody (line 140) | pub struct GenericRerankResBody { function generic_build_rerank_body (line 144) | pub fn generic_build_rerank_body(data: &RerankData, model: &Model) -> Va... FILE: src/client/stream.rs type SseHandler (line 11) | pub struct SseHandler { method new (line 19) | pub fn new(sender: UnboundedSender, abort_signal: AbortSigna... method text (line 28) | pub fn text(&mut self, text: &str) -> Result<()> { method done (line 47) | pub fn done(&mut self) { method tool_call (line 58) | pub fn tool_call(&mut self, call: ToolCall) -> Result<()> { method abort (line 64) | pub fn abort(&self) -> AbortSignal { method tool_calls (line 68) | pub fn tool_calls(&self) -> &[ToolCall] { method take (line 72) | pub fn take(self) -> (String, Vec) { type SseEvent (line 81) | pub enum SseEvent { type SseMmessage (line 87) | pub struct SseMmessage { function sse_stream (line 93) | pub async fn sse_stream(builder: RequestBuilder, mut handle: F) -> Re... function json_stream (line 144) | pub async fn json_stream(mut stream: S, mut handle: F) -> Resul... type JsonStreamParser (line 175) | struct JsonStreamParser { method process (line 185) | fn process(&mut self, text: &str, handle: &mut F) -> Result<()> function split_chunks (line 248) | fn split_chunks(text: &str) -> Vec> { function test_json_stream_ndjson (line 278) | async fn test_json_stream_ndjson() { function test_json_stream_array (line 286) | async fn test_json_stream_array() { FILE: src/client/vertexai.rs type VertexAIConfig (line 14) | pub struct VertexAIConfig { constant PROMPTS (line 29) | pub const PROMPTS: [PromptAction<'static>; 2] = [ method chat_completions_inner (line 39) | async fn chat_completions_inner( method chat_completions_streaming_inner (line 56) | async fn chat_completions_streaming_inner( method embeddings_inner (line 80) | async fn embeddings_inner( function prepare_chat_completions (line 92) | fn prepare_chat_completions( function prepare_embeddings (line 155) | fn prepare_embeddings(self_: &VertexAIClient, data: &EmbeddingsData) -> ... function gemini_chat_completions (line 183) | pub async fn gemini_chat_completions( function gemini_chat_completions_streaming (line 197) | pub async fn gemini_chat_completions_streaming( function embeddings (line 239) | async fn embeddings(builder: RequestBuilder, _model: &Model) -> Result Result std::result::Result { function prepare_gcloud_access_token (line 450) | pub async fn prepare_gcloud_access_token( function fetch_access_token (line 467) | async fn fetch_access_token( function load_adc (line 491) | async fn load_adc(file: &Option) -> Result { function default_adc_file (line 516) | fn default_adc_file() -> Option { function default_adc_file (line 525) | fn default_adc_file() -> Option { function strip_model_version (line 532) | fn strip_model_version(name: &str) -> &str { FILE: src/config/agent.rs constant DEFAULT_AGENT_NAME (line 14) | const DEFAULT_AGENT_NAME: &str = "rag"; type AgentVariables (line 16) | pub type AgentVariables = IndexMap; type Agent (line 19) | pub struct Agent { method init (line 33) | pub async fn init( method init_agent_variables (line 121) | pub fn init_agent_variables( method export (line 183) | pub fn export(&self) -> Result { method banner (line 210) | pub fn banner(&self) -> String { method name (line 214) | pub fn name(&self) -> &str { method functions (line 218) | pub fn functions(&self) -> &Functions { method rag (line 222) | pub fn rag(&self) -> Option> { method conversation_staters (line 226) | pub fn conversation_staters(&self) -> &[String] { method interpolated_instructions (line 230) | pub fn interpolated_instructions(&self) -> String { method agent_prelude (line 244) | pub fn agent_prelude(&self) -> Option<&str> { method variables (line 248) | pub fn variables(&self) -> &AgentVariables { method variable_envs (line 255) | pub fn variable_envs(&self) -> HashMap { method config_variables (line 267) | pub fn config_variables(&self) -> &AgentVariables { method shared_variables (line 271) | pub fn shared_variables(&self) -> &AgentVariables { method set_shared_variables (line 275) | pub fn set_shared_variables(&mut self, shared_variables: AgentVariable... method set_session_variables (line 279) | pub fn set_session_variables(&mut self, session_variables: AgentVariab... method defined_variables (line 283) | pub fn defined_variables(&self) -> &[AgentVariable] { method exit_session (line 287) | pub fn exit_session(&mut self) { method is_dynamic_instructions (line 292) | pub fn is_dynamic_instructions(&self) -> bool { method update_shared_dynamic_instructions (line 296) | pub fn update_shared_dynamic_instructions(&mut self, force: bool) -> R... method update_session_dynamic_instructions (line 303) | pub fn update_session_dynamic_instructions(&mut self, value: Option Result { method to_role (line 328) | fn to_role(&self) -> Role { method model (line 335) | fn model(&self) -> &Model { method temperature (line 339) | fn temperature(&self) -> Option { method top_p (line 343) | fn top_p(&self) -> Option { method use_tools (line 347) | fn use_tools(&self) -> Option { method set_model (line 351) | fn set_model(&mut self, model: Model) { method set_temperature (line 356) | fn set_temperature(&mut self, value: Option) { method set_top_p (line 360) | fn set_top_p(&mut self, value: Option) { method set_use_tools (line 364) | fn set_use_tools(&mut self, value: Option) { type AgentConfig (line 370) | pub struct AgentConfig { method new (line 388) | pub fn new(config: &Config) -> Self { method load (line 396) | pub fn load(path: &Path) -> Result { method load_envs (line 404) | fn load_envs(&mut self, name: &str) { type AgentDefinition (line 434) | pub struct AgentDefinition { method load (line 453) | pub fn load(path: &Path) -> Result { method banner (line 461) | fn banner(&self) -> String { method replace_tools_placeholder (line 490) | fn replace_tools_placeholder(&mut self, functions: &Functions) { type AgentVariable (line 512) | pub struct AgentVariable { function list_agents (line 521) | pub fn list_agents() -> Vec { function complete_agent_variables (line 540) | pub fn complete_agent_variables(agent_name: &str) -> Vec<(String, Option... FILE: src/config/input.rs constant IMAGE_EXTS (line 15) | const IMAGE_EXTS: [&str; 5] = ["png", "jpeg", "jpg", "webp", "gif"]; constant SUMMARY_MAX_WIDTH (line 16) | const SUMMARY_MAX_WIDTH: usize = 80; type Input (line 19) | pub struct Input { method from_str (line 37) | pub fn from_str(config: &GlobalConfig, text: &str, role: Option)... method from_files (line 57) | pub async fn from_files( method from_files_with_spinner (line 124) | pub async fn from_files_with_spinner( method is_empty (line 139) | pub fn is_empty(&self) -> bool { method data_urls (line 143) | pub fn data_urls(&self) -> HashMap { method tool_calls (line 147) | pub fn tool_calls(&self) -> &Option { method text (line 151) | pub fn text(&self) -> String { method clear_patch (line 158) | pub fn clear_patch(&mut self) { method set_text (line 162) | pub fn set_text(&mut self, text: String) { method stream (line 166) | pub fn stream(&self) -> bool { method continue_output (line 170) | pub fn continue_output(&self) -> Option<&str> { method set_continue_output (line 174) | pub fn set_continue_output(&mut self, output: &str) { method regenerate (line 182) | pub fn regenerate(&self) -> bool { method set_regenerate (line 186) | pub fn set_regenerate(&mut self) { method use_embeddings (line 195) | pub async fn use_embeddings(&mut self, abort_signal: AbortSignal) -> R... method rag_name (line 208) | pub fn rag_name(&self) -> Option<&str> { method merge_tool_results (line 212) | pub fn merge_tool_results(mut self, output: String, tool_results: Vec<... method create_client (line 222) | pub fn create_client(&self) -> Result> { method fetch_chat_text (line 226) | pub async fn fetch_chat_text(&self) -> Result { method prepare_completion_data (line 233) | pub fn prepare_completion_data( method build_messages (line 252) | pub fn build_messages(&self) -> Result> { method echo_messages (line 267) | pub fn echo_messages(&self) -> String { method role (line 275) | pub fn role(&self) -> &Role { method session (line 279) | pub fn session<'a>(&self, session: &'a Option) -> Option<&'a ... method session_mut (line 287) | pub fn session_mut<'a>(&self, session: &'a mut Option) -> Opt... method with_agent (line 295) | pub fn with_agent(&self) -> bool { method summary (line 299) | pub fn summary(&self) -> String { method raw (line 323) | pub fn raw(&self) -> String { method render (line 338) | pub fn render(&self) -> String { method message_content (line 357) | pub fn message_content(&self) -> MessageContent { function resolve_role (line 377) | fn resolve_role(config: &Config, role: Option) -> (Role, bool, boo... type ResolvePathsOutput (line 388) | type ResolvePathsOutput = ( function resolve_paths (line 397) | fn resolve_paths( function load_documents (line 441) | async fn load_documents( function resolve_data_url (line 505) | pub fn resolve_data_url(data_urls: &HashMap, data_url: S... function is_image (line 517) | fn is_image(path: &str) -> bool { function read_media_to_data_url (line 523) | fn read_media_to_data_url(image_path: &str) -> Result { FILE: src/config/mod.rs constant TEMP_ROLE_NAME (line 44) | pub const TEMP_ROLE_NAME: &str = "%%"; constant TEMP_RAG_NAME (line 45) | pub const TEMP_RAG_NAME: &str = "temp"; constant TEMP_SESSION_NAME (line 46) | pub const TEMP_SESSION_NAME: &str = "temp"; constant DARK_THEME (line 49) | const DARK_THEME: &[u8] = include_bytes!("../../assets/monokai-extended.... constant LIGHT_THEME (line 50) | const LIGHT_THEME: &[u8] = include_bytes!("../../assets/monokai-extended... constant CONFIG_FILE_NAME (line 52) | const CONFIG_FILE_NAME: &str = "config.yaml"; constant ROLES_DIR_NAME (line 53) | const ROLES_DIR_NAME: &str = "roles"; constant MACROS_DIR_NAME (line 54) | const MACROS_DIR_NAME: &str = "macros"; constant ENV_FILE_NAME (line 55) | const ENV_FILE_NAME: &str = ".env"; constant MESSAGES_FILE_NAME (line 56) | const MESSAGES_FILE_NAME: &str = "messages.md"; constant SESSIONS_DIR_NAME (line 57) | const SESSIONS_DIR_NAME: &str = "sessions"; constant RAGS_DIR_NAME (line 58) | const RAGS_DIR_NAME: &str = "rags"; constant FUNCTIONS_DIR_NAME (line 59) | const FUNCTIONS_DIR_NAME: &str = "functions"; constant FUNCTIONS_FILE_NAME (line 60) | const FUNCTIONS_FILE_NAME: &str = "functions.json"; constant FUNCTIONS_BIN_DIR_NAME (line 61) | const FUNCTIONS_BIN_DIR_NAME: &str = "bin"; constant AGENTS_DIR_NAME (line 62) | const AGENTS_DIR_NAME: &str = "agents"; constant CLIENTS_FIELD (line 64) | const CLIENTS_FIELD: &str = "clients"; constant SERVE_ADDR (line 66) | const SERVE_ADDR: &str = "127.0.0.1:8000"; constant SYNC_MODELS_URL (line 68) | const SYNC_MODELS_URL: &str = constant SUMMARIZE_PROMPT (line 71) | const SUMMARIZE_PROMPT: &str = constant SUMMARY_PROMPT (line 73) | const SUMMARY_PROMPT: &str = "This is a summary of the chat history as a... constant RAG_TEMPLATE (line 75) | const RAG_TEMPLATE: &str = r#"Answer the query based on the context whil... constant LEFT_PROMPT (line 94) | const LEFT_PROMPT: &str = "{color.green}{?session {?agent {agent}>}{sess... constant RIGHT_PROMPT (line 95) | const RIGHT_PROMPT: &str = "{color.purple}{?session {?consume_tokens {co... type Config (line 101) | pub struct Config { method init (line 246) | pub async fn init(working_mode: WorkingMode, info_flag: bool) -> Resul... method config_dir (line 289) | pub fn config_dir() -> PathBuf { method local_path (line 300) | pub fn local_path(name: &str) -> PathBuf { method config_file (line 304) | pub fn config_file() -> PathBuf { method roles_dir (line 311) | pub fn roles_dir() -> PathBuf { method role_file (line 318) | pub fn role_file(name: &str) -> PathBuf { method macros_dir (line 322) | pub fn macros_dir() -> PathBuf { method macro_file (line 329) | pub fn macro_file(name: &str) -> PathBuf { method env_file (line 333) | pub fn env_file() -> PathBuf { method messages_file (line 340) | pub fn messages_file(&self) -> PathBuf { method sessions_dir (line 350) | pub fn sessions_dir(&self) -> PathBuf { method rags_dir (line 360) | pub fn rags_dir() -> PathBuf { method functions_dir (line 367) | pub fn functions_dir() -> PathBuf { method functions_file (line 374) | pub fn functions_file() -> PathBuf { method functions_bin_dir (line 378) | pub fn functions_bin_dir() -> PathBuf { method session_file (line 382) | pub fn session_file(&self, name: &str) -> PathBuf { method rag_file (line 389) | pub fn rag_file(&self, name: &str) -> PathBuf { method agents_data_dir (line 396) | pub fn agents_data_dir() -> PathBuf { method agent_data_dir (line 400) | pub fn agent_data_dir(name: &str) -> PathBuf { method agent_config_file (line 407) | pub fn agent_config_file(name: &str) -> PathBuf { method agent_rag_file (line 414) | pub fn agent_rag_file(agent_name: &str, rag_name: &str) -> PathBuf { method agents_functions_dir (line 418) | pub fn agents_functions_dir() -> PathBuf { method agent_functions_dir (line 422) | pub fn agent_functions_dir(name: &str) -> PathBuf { method models_override_file (line 429) | pub fn models_override_file() -> PathBuf { method state (line 433) | pub fn state(&self) -> StateFlags { method serve_addr (line 456) | pub fn serve_addr(&self) -> String { method log_config (line 460) | pub fn log_config(is_serve: bool) -> Result<(LevelFilter, Option Result<()> { method current_model (line 502) | pub fn current_model(&self) -> &Model { method role_like_mut (line 514) | pub fn role_like_mut(&mut self) -> Option<&mut dyn RoleLike> { method extract_role (line 526) | pub fn extract_role(&self) -> Role { method info (line 545) | pub fn info(&self) -> Result { method sysinfo (line 570) | pub fn sysinfo(&self) -> Result { method update (line 629) | pub fn update(config: &GlobalConfig, data: &str) -> Result<()> { method delete (line 697) | pub fn delete(config: &GlobalConfig, kind: &str) -> Result<()> { method set_temperature (line 766) | pub fn set_temperature(&mut self, value: Option) { method set_top_p (line 773) | pub fn set_top_p(&mut self, value: Option) { method set_use_tools (line 780) | pub fn set_use_tools(&mut self, value: Option) { method set_save_session (line 787) | pub fn set_save_session(&mut self, value: Option) { method set_compress_threshold (line 795) | pub fn set_compress_threshold(&mut self, value: Option) { method set_rag_reranker_model (line 803) | pub fn set_rag_reranker_model(config: &GlobalConfig, value: Option Result<()> { method set_wrap (line 830) | pub fn set_wrap(&mut self, value: &str) -> Result<()> { method set_max_output_tokens (line 844) | pub fn set_max_output_tokens(&mut self, value: Option) { method set_model (line 857) | pub fn set_model(&mut self, model_id: &str) -> Result<()> { method use_prompt (line 868) | pub fn use_prompt(&mut self, prompt: &str) -> Result<()> { method use_role (line 874) | pub fn use_role(&mut self, name: &str) -> Result<()> { method use_role_obj (line 879) | pub fn use_role_obj(&mut self, role: Role) -> Result<()> { method role_info (line 892) | pub fn role_info(&self) -> Result { method exit_role (line 907) | pub fn exit_role(&mut self) -> Result<()> { method retrieve_role (line 917) | pub fn retrieve_role(&self, name: &str) -> Result { method new_role (line 949) | pub fn new_role(&mut self, name: &str) -> Result<()> { method edit_role (line 964) | pub fn edit_role(&mut self) -> Result<()> { method upsert_role (line 984) | pub fn upsert_role(&mut self, name: &str) -> Result<()> { method save_role (line 995) | pub fn save_role(&mut self, name: Option<&str>) -> Result<()> { method all_roles (line 1030) | pub fn all_roles() -> Vec { method list_roles (line 1047) | pub fn list_roles(with_builtin: bool) -> Vec { method has_role (line 1068) | pub fn has_role(name: &str) -> bool { method use_session (line 1073) | pub fn use_session(&mut self, session_name: Option<&str>) -> Result<()> { method session_info (line 1129) | pub fn session_info(&self) -> Result { method exit_session (line 1148) | pub fn exit_session(&mut self) -> Result<()> { method save_session (line 1157) | pub fn save_session(&mut self, name: Option<&str>) -> Result<()> { method edit_session (line 1175) | pub fn edit_session(&mut self) -> Result<()> { method empty_session (line 1194) | pub fn empty_session(&mut self) -> Result<()> { method set_save_session_this_time (line 1207) | pub fn set_save_session_this_time(&mut self) -> Result<()> { method list_sessions (line 1216) | pub fn list_sessions(&self) -> Vec { method list_autoname_sessions (line 1220) | pub fn list_autoname_sessions(&self) -> Vec { method maybe_compress_session (line 1224) | pub fn maybe_compress_session(config: GlobalConfig) { method compress_session (line 1258) | pub async fn compress_session(config: &GlobalConfig) -> Result<()> { method is_compressing_session (line 1287) | pub fn is_compressing_session(&self) -> bool { method maybe_autoname_session (line 1294) | pub fn maybe_autoname_session(config: GlobalConfig) { method autoname_session (line 1321) | pub async fn autoname_session(config: &GlobalConfig) -> Result<()> { method use_rag (line 1340) | pub async fn use_rag( method edit_rag_docs (line 1374) | pub async fn edit_rag_docs(config: &GlobalConfig, abort_signal: AbortS... method rebuild_rag (line 1410) | pub async fn rebuild_rag(config: &GlobalConfig, abort_signal: AbortSig... method rag_sources (line 1422) | pub fn rag_sources(config: &GlobalConfig) -> Result { method rag_info (line 1432) | pub fn rag_info(&self) -> Result { method exit_rag (line 1440) | pub fn exit_rag(&mut self) -> Result<()> { method search_rag (line 1445) | pub async fn search_rag( method list_rags (line 1460) | pub fn list_rags() -> Vec { method rag_template (line 1477) | pub fn rag_template(&self, embeddings: &str, text: &str) -> String { method use_agent (line 1488) | pub async fn use_agent( method agent_info (line 1518) | pub fn agent_info(&self) -> Result { method agent_banner (line 1526) | pub fn agent_banner(&self) -> Result { method edit_agent_config (line 1534) | pub fn edit_agent_config(&self) -> Result<()> { method exit_agent (line 1557) | pub fn exit_agent(&mut self) -> Result<()> { method exit_agent_session (line 1566) | pub fn exit_agent_session(&mut self) -> Result<()> { method list_macros (line 1577) | pub fn list_macros() -> Vec { method load_macro (line 1581) | pub fn load_macro(name: &str) -> Result { method has_macro (line 1589) | pub fn has_macro(name: &str) -> bool { method new_macro (line 1594) | pub fn new_macro(&mut self, name: &str) -> Result<()> { method apply_prelude (line 1612) | pub fn apply_prelude(&mut self) -> Result<()> { method select_functions (line 1652) | pub fn select_functions(&self, role: &Role) -> Option Result { method repl_complete (line 1738) | pub fn repl_complete( method sync_models_url (line 1863) | pub fn sync_models_url(&self) -> String { method sync_models (line 1869) | pub async fn sync_models(url: &str, abort_signal: AbortSignal) -> Resu... method loal_models_override (line 1891) | pub fn loal_models_override() -> Result> { method light_theme (line 1907) | pub fn light_theme(&self) -> bool { method render_options (line 1911) | pub fn render_options(&self) -> Result { method render_prompt_left (line 1943) | pub fn render_prompt_left(&self) -> String { method render_prompt_right (line 1949) | pub fn render_prompt_right(&self) -> String { method print_markdown (line 1955) | pub fn print_markdown(&self, text: &str) -> Result<()> { method generate_prompt_context (line 1966) | fn generate_prompt_context(&self) -> HashMap<&str, String> { method before_chat_completion (line 2049) | pub fn before_chat_completion(&mut self, input: &Input) -> Result<()> { method after_chat_completion (line 2054) | pub fn after_chat_completion( method discontinuous_last_message (line 2070) | fn discontinuous_last_message(&mut self) { method save_message (line 2076) | fn save_message(&mut self, input: &Input, output: &str) -> Result<()> { method init_agent_shared_variables (line 2130) | fn init_agent_shared_variables(&mut self) -> Result<()> { method init_agent_session_variables (line 2153) | fn init_agent_session_variables(&mut self, new_session: bool) -> Resul... method open_message_file (line 2191) | fn open_message_file(&self) -> Result { method load_from_file (line 2201) | fn load_from_file(config_path: &Path) -> Result { method load_dynamic (line 2225) | fn load_dynamic(model_id: &str) -> Result { method load_envs (line 2248) | fn load_envs(&mut self) { method load_functions (line 2383) | fn load_functions(&mut self) -> Result<()> { method setup_model (line 2388) | fn setup_model(&mut self) -> Result<()> { method setup_document_loaders (line 2402) | fn setup_document_loaders(&mut self) { method setup_user_agent (line 2411) | fn setup_user_agent(&mut self) { method default (line 178) | fn default() -> Self { type GlobalConfig (line 243) | pub type GlobalConfig = Arc>; function load_env_file (line 2422) | pub fn load_env_file() -> Result<()> { type WorkingMode (line 2442) | pub enum WorkingMode { method is_cmd (line 2449) | pub fn is_cmd(&self) -> bool { method is_repl (line 2452) | pub fn is_repl(&self) -> bool { method is_serve (line 2455) | pub fn is_serve(&self) -> bool { function macro_execute (line 2461) | pub async fn macro_execute( type Macro (line 2498) | pub struct Macro { method resolve_variables (line 2505) | pub fn resolve_variables(&self, args: &[String]) -> Result String { method interpolate_command (line 2543) | pub fn interpolate_command(command: &str, variables: &IndexMap Self { type AssertState (line 2595) | pub enum AssertState { method pass (line 2603) | pub fn pass() -> Self { method bare (line 2607) | pub fn bare() -> Self { method assert (line 2611) | pub fn assert(self, flags: StateFlags) -> bool { function create_config_file (line 2624) | async fn create_config_file(config_path: &Path) -> Result<()> { function ensure_parent_exists (line 2659) | pub(crate) fn ensure_parent_exists(path: &Path) -> Result<()> { function read_env_value (line 2677) | fn read_env_value(key: &str) -> Option> function parse_value (line 2686) | fn parse_value(value: &str) -> Result> function read_env_bool (line 2702) | fn read_env_bool(key: &str) -> Option> { function complete_bool (line 2707) | fn complete_bool(value: bool) -> Vec { function complete_option_bool (line 2711) | fn complete_option_bool(value: Option) -> Vec { function map_completion_values (line 2719) | fn map_completion_values(value: Vec) -> Vec<(String, Opt... function update_rag (line 2723) | fn update_rag(config: &GlobalConfig, f: F) -> Result<()> function format_option_value (line 2736) | fn format_option_value(value: &Option) -> String FILE: src/config/role.rs constant SHELL_ROLE (line 12) | pub const SHELL_ROLE: &str = "%shell%"; constant EXPLAIN_SHELL_ROLE (line 13) | pub const EXPLAIN_SHELL_ROLE: &str = "%explain-shell%"; constant CODE_ROLE (line 14) | pub const CODE_ROLE: &str = "%code%"; constant CREATE_TITLE_ROLE (line 15) | pub const CREATE_TITLE_ROLE: &str = "%create-title%"; constant INPUT_PLACEHOLDER (line 17) | pub const INPUT_PLACEHOLDER: &str = "__INPUT__"; type RolesAsset (line 21) | struct RolesAsset; type RoleLike (line 26) | pub trait RoleLike { method to_role (line 27) | fn to_role(&self) -> Role; method model (line 28) | fn model(&self) -> &Model; method temperature (line 29) | fn temperature(&self) -> Option; method top_p (line 30) | fn top_p(&self) -> Option; method use_tools (line 31) | fn use_tools(&self) -> Option; method set_model (line 32) | fn set_model(&mut self, model: Model); method set_temperature (line 33) | fn set_temperature(&mut self, value: Option); method set_top_p (line 34) | fn set_top_p(&mut self, value: Option); method set_use_tools (line 35) | fn set_use_tools(&mut self, value: Option); method to_role (line 263) | fn to_role(&self) -> Role { method model (line 267) | fn model(&self) -> &Model { method temperature (line 271) | fn temperature(&self) -> Option { method top_p (line 275) | fn top_p(&self) -> Option { method use_tools (line 279) | fn use_tools(&self) -> Option { method set_model (line 283) | fn set_model(&mut self, model: Model) { method set_temperature (line 290) | fn set_temperature(&mut self, value: Option) { method set_top_p (line 294) | fn set_top_p(&mut self, value: Option) { method set_use_tools (line 298) | fn set_use_tools(&mut self, value: Option) { type Role (line 39) | pub struct Role { method new (line 60) | pub fn new(name: &str, content: &str) -> Self { method builtin (line 94) | pub fn builtin(name: &str) -> Result { method list_builtin_role_names (line 101) | pub fn list_builtin_role_names() -> Vec { method list_builtin_roles (line 107) | pub fn list_builtin_roles() -> Vec { method has_args (line 113) | pub fn has_args(&self) -> bool { method export (line 117) | pub fn export(&self) -> String { method save (line 140) | pub fn save(&mut self, role_name: &str, role_path: &Path, is_repl: boo... method sync (line 163) | pub fn sync(&mut self, role_like: &T) { method batch_set (line 171) | pub fn batch_set( method is_derived (line 190) | pub fn is_derived(&self) -> bool { method name (line 194) | pub fn name(&self) -> &str { method model_id (line 198) | pub fn model_id(&self) -> Option<&str> { method prompt (line 202) | pub fn prompt(&self) -> &str { method is_empty_prompt (line 206) | pub fn is_empty_prompt(&self) -> bool { method is_embedded_prompt (line 210) | pub fn is_embedded_prompt(&self) -> bool { method echo_messages (line 214) | pub fn echo_messages(&self, input: &Input) -> String { method build_messages (line 225) | pub fn build_messages(&self, input: &Input) -> Vec { function parse_structure_prompt (line 303) | fn parse_structure_prompt(prompt: &str) -> (&str, Vec<(&str, &str)>) { function test_parse_structure_prompt1 (line 356) | fn test_parse_structure_prompt1() { function test_parse_structure_prompt2 (line 371) | fn test_parse_structure_prompt2() { function test_parse_structure_prompt3 (line 385) | fn test_parse_structure_prompt3() { FILE: src/config/session.rs type Session (line 20) | pub struct Session { method new (line 68) | pub fn new(config: &Config, name: &str) -> Self { method load (line 80) | pub fn load(config: &Config, name: &str, path: &Path) -> Result { method is_empty (line 110) | pub fn is_empty(&self) -> bool { method name (line 114) | pub fn name(&self) -> &str { method role_name (line 118) | pub fn role_name(&self) -> Option<&str> { method dirty (line 122) | pub fn dirty(&self) -> bool { method save_session (line 126) | pub fn save_session(&self) -> Option { method tokens (line 130) | pub fn tokens(&self) -> usize { method update_tokens (line 134) | pub fn update_tokens(&mut self) { method has_user_messages (line 138) | pub fn has_user_messages(&self) -> bool { method user_messages_len (line 142) | pub fn user_messages_len(&self) -> usize { method export (line 146) | pub fn export(&self) -> Result { method render (line 178) | pub fn render( method tokens_usage (line 258) | pub fn tokens_usage(&self) -> (usize, f32) { method set_role (line 270) | pub fn set_role(&mut self, role: Role) { method clear_role (line 282) | pub fn clear_role(&mut self) { method sync_agent (line 287) | pub fn sync_agent(&mut self, agent: &Agent) { method agent_variables (line 294) | pub fn agent_variables(&self) -> &AgentVariables { method agent_instructions (line 298) | pub fn agent_instructions(&self) -> &str { method set_save_session (line 302) | pub fn set_save_session(&mut self, value: Option) { method set_save_session_this_time (line 309) | pub fn set_save_session_this_time(&mut self) { method set_compress_threshold (line 313) | pub fn set_compress_threshold(&mut self, value: Option) { method need_compress (line 320) | pub fn need_compress(&self, global_compress_threshold: usize) -> bool { method compressing (line 331) | pub fn compressing(&self) -> bool { method set_compressing (line 335) | pub fn set_compressing(&mut self, compressing: bool) { method compress (line 339) | pub fn compress(&mut self, mut prompt: String) { method need_autoname (line 360) | pub fn need_autoname(&self) -> bool { method set_autonaming (line 364) | pub fn set_autonaming(&mut self, naming: bool) { method chat_history_for_autonaming (line 370) | pub fn chat_history_for_autonaming(&self) -> Option { method autoname (line 374) | pub fn autoname(&self) -> Option<&str> { method set_autoname (line 378) | pub fn set_autoname(&mut self, value: &str) { method exit (line 386) | pub fn exit(&mut self, session_dir: &Path, is_repl: bool) -> Result<()> { method save (line 434) | pub fn save(&mut self, session_name: &str, session_path: &Path, is_rep... method guard_empty (line 462) | pub fn guard_empty(&self) -> Result<()> { method add_message (line 469) | pub fn add_message(&mut self, input: &Input, output: &str) -> Result<(... method clear_messages (line 511) | pub fn clear_messages(&mut self) { method echo_messages (line 520) | pub fn echo_messages(&self, input: &Input) -> String { method build_messages (line 525) | pub fn build_messages(&self, input: &Input) -> Vec { method to_role (line 561) | fn to_role(&self) -> Role { method model (line 568) | fn model(&self) -> &Model { method temperature (line 572) | fn temperature(&self) -> Option { method top_p (line 576) | fn top_p(&self) -> Option { method use_tools (line 580) | fn use_tools(&self) -> Option { method set_model (line 584) | fn set_model(&mut self, model: Model) { method set_temperature (line 593) | fn set_temperature(&mut self, value: Option) { method set_top_p (line 600) | fn set_top_p(&mut self, value: Option) { method set_use_tools (line 607) | fn set_use_tools(&mut self, value: Option) { type AutoName (line 616) | struct AutoName { method new (line 623) | pub fn new(name: String) -> Self { method new_from_chat_history (line 629) | pub fn new_from_chat_history(chat_history: String) -> Self { method need (line 635) | pub fn need(&self) -> bool { FILE: src/function.rs constant PATH_SEP (line 17) | const PATH_SEP: &str = ";"; constant PATH_SEP (line 19) | const PATH_SEP: &str = ":"; function eval_tool_calls (line 21) | pub fn eval_tool_calls(config: &GlobalConfig, mut calls: Vec) ... type ToolResult (line 47) | pub struct ToolResult { method new (line 53) | pub fn new(call: ToolCall, output: Value) -> Self { type Functions (line 59) | pub struct Functions { method init (line 64) | pub fn init(declarations_path: &Path) -> Result { method find (line 81) | pub fn find(&self, name: &str) -> Option<&FunctionDeclaration> { method contains (line 85) | pub fn contains(&self, name: &str) -> bool { method declarations (line 89) | pub fn declarations(&self) -> &[FunctionDeclaration] { method is_empty (line 93) | pub fn is_empty(&self) -> bool { type FunctionDeclaration (line 99) | pub struct FunctionDeclaration { type JsonSchema (line 108) | pub struct JsonSchema { method is_empty_properties (line 128) | pub fn is_empty_properties(&self) -> bool { type ToolCall (line 137) | pub struct ToolCall { method dedup (line 146) | pub fn dedup(calls: Vec) -> Vec { method new (line 165) | pub fn new(name: String, arguments: Value, id: Option) -> Self { method eval (line 173) | pub fn eval(&self, config: &GlobalConfig) -> Result { method extract_call_config_from_agent (line 205) | fn extract_call_config_from_agent( method extract_call_config_from_config (line 234) | fn extract_call_config_from_config(&self, config: &GlobalConfig) -> Re... type CallConfig (line 143) | type CallConfig = (String, String, Vec, HashMap); function run_llm_function (line 248) | pub fn run_llm_function( function polyfill_cmd_name (line 296) | fn polyfill_cmd_name>(cmd_name: &str, bin_dir: &[T]) -> S... FILE: src/main.rs function main (line 35) | async fn main() -> Result<()> { function run (line 63) | async fn run(config: GlobalConfig, cli: Cli, text: Option) -> Re... function start_directive (line 196) | async fn start_directive( function start_interactive (line 235) | async fn start_interactive(config: &GlobalConfig) -> Result<()> { function shell_execute (line 241) | async fn shell_execute( function create_input (line 328) | async fn create_input( function setup_logger (line 352) | fn setup_logger(is_serve: bool) -> Result<()> { FILE: src/rag/mod.rs type Rag (line 21) | pub struct Rag { method init (line 59) | pub async fn init( method load (line 102) | pub fn load(config: &GlobalConfig, name: &str, path: &Path) -> Result<... method create (line 109) | pub fn create(config: &GlobalConfig, name: &str, path: &Path, data: Ra... method document_paths (line 127) | pub fn document_paths(&self) -> &[String] { method refresh_document_paths (line 131) | pub async fn refresh_document_paths( method create_config (line 152) | pub fn create_config(config: &GlobalConfig) -> Result<(Model, usize, u... method get_config (line 198) | pub fn get_config(&self) -> (Option, usize) { method get_last_sources (line 202) | pub fn get_last_sources(&self) -> Option { method set_last_sources (line 206) | pub fn set_last_sources(&self, ids: &[DocumentId]) { method set_reranker_model (line 231) | pub fn set_reranker_model(&mut self, reranker_model: Option) -... method set_top_k (line 237) | pub fn set_top_k(&mut self, top_k: usize) -> Result<()> { method save (line 243) | pub fn save(&self) -> Result { method export (line 259) | pub fn export(&self) -> Result { method name (line 287) | pub fn name(&self) -> &str { method is_temp (line 291) | pub fn is_temp(&self) -> bool { method search (line 295) | pub async fn search( method sync_documents (line 313) | pub async fn sync_documents( method hybird_search (line 509) | async fn hybird_search( method vector_search (line 577) | async fn vector_search( method keyword_search (line 611) | async fn keyword_search( method create_embeddings (line 632) | async fn create_embeddings( method fmt (line 33) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method clone (line 44) | fn clone(&self) -> Self { type RagData (line 693) | pub struct RagData { method new (line 724) | pub fn new( method get (line 746) | pub fn get(&self, id: DocumentId) -> Option<&RagDocument> { method del (line 753) | pub fn del(&mut self, file_ids: Vec) { method add (line 764) | pub fn add( method build_hnsw (line 777) | pub fn build_hnsw(&self) -> Hnsw<'static, f32, DistCosine> { method build_bm25 (line 784) | pub fn build_bm25(&self) -> SearchEngine { method fmt (line 708) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type RagFile (line 800) | pub struct RagFile { type RagDocument (line 807) | pub struct RagDocument { method new (line 813) | pub fn new>(page_content: S) -> Self { method default (line 822) | fn default() -> Self { type FileId (line 830) | pub type FileId = usize; type DocumentId (line 833) | pub struct DocumentId(usize); method new (line 843) | pub fn new(file_index: usize, document_index: usize) -> Self { method split (line 848) | pub fn split(self) -> (usize, usize) { method fmt (line 836) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { function select_embedding_model (line 857) | fn select_embedding_model(models: &[&Model]) -> Result { type SelectOption (line 867) | struct SelectOption { method new (line 873) | pub fn new(value: String, description: String) -> Self { method fmt (line 879) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { function set_chunk_size (line 884) | fn set_chunk_size(model: &Model) -> Result { function set_chunk_overlay (line 906) | fn set_chunk_overlay(default_value: usize) -> Result { function add_documents (line 920) | fn add_documents() -> Result> { function resolve_paths (line 939) | async fn resolve_paths>( function progress (line 984) | fn progress(spinner: &Option, message: String) { function reciprocal_rank_fusion (line 990) | fn reciprocal_rank_fusion( FILE: src/rag/serde_vectors.rs function serialize (line 6) | pub fn serialize( function deserialize (line 30) | pub fn deserialize<'de, D>(deserializer: D) -> Result Vec<&str> { FILE: src/rag/splitter/mod.rs constant DEFAULT_SEPARATES (line 7) | pub const DEFAULT_SEPARATES: [&str; 4] = ["\n\n", "\n", " ", ""]; function get_separators (line 9) | pub fn get_separators(extension: &str) -> Vec<&'static str> { type RecursiveCharacterTextSplitter (line 31) | pub struct RecursiveCharacterTextSplitter { method new (line 50) | pub fn new(chunk_size: usize, chunk_overlap: usize, separators: &[&str... method with_chunk_size (line 57) | pub fn with_chunk_size(mut self, chunk_size: usize) -> Self { method with_chunk_overlap (line 62) | pub fn with_chunk_overlap(mut self, chunk_overlap: usize) -> Self { method with_separators (line 67) | pub fn with_separators(mut self, separators: &[&str]) -> Self { method split_documents (line 72) | pub fn split_documents( method create_documents (line 89) | pub fn create_documents( method split_text (line 144) | pub fn split_text(&self, text: &str) -> Vec { method split_text_impl (line 152) | fn split_text_impl( method merge_splits (line 204) | fn merge_splits(&self, splits: &[String], separator: &str) -> Vec Option { method default (line 39) | fn default() -> Self { type SplitterChunkHeaderOptions (line 251) | pub struct SplitterChunkHeaderOptions { method with_chunk_header (line 268) | pub fn with_chunk_header(mut self, header: &str) -> Self { method with_chunk_overlap_header (line 275) | pub fn with_chunk_overlap_header(mut self, overlap_header: &str) -> Se... method default (line 257) | fn default() -> Self { function split_on_separator (line 281) | fn split_on_separator<'a>(text: &'a str, separator: &str, keep_separator... function build_metadata (line 314) | fn build_metadata(source: &str) -> Value { function test_split_text (line 318) | fn test_split_text() { function test_create_document (line 330) | fn test_create_document() { function test_chunk_header (line 363) | fn test_chunk_header() { function test_markdown_splitter (line 398) | fn test_markdown_splitter() { function test_html_splitter (line 424) | fn test_html_splitter() { FILE: src/render/markdown.rs constant SYNTAXES (line 14) | const SYNTAXES: &[u8] = include_bytes!("../../assets/syntaxes.bin"); type MarkdownRender (line 23) | pub struct MarkdownRender { method init (line 34) | pub fn init(options: RenderOptions) -> Result { method render (line 71) | pub fn render(&mut self, text: &str) -> String { method render_line (line 78) | pub fn render_line(&self, line: &str) -> String { method render_line_mut (line 87) | fn render_line_mut(&mut self, line: &str) -> String { method check_line (line 99) | fn check_line(&self, line: &str) -> (LineType, Option... method highlight_line (line 141) | fn highlight_line(&self, line: &str, syntax: &SyntaxReference, is_code... method highlight_code_line (line 158) | fn highlight_code_line(&self, line: &str, code_syntax: &Option String { method find_syntax (line 181) | fn find_syntax(&self, lang: &str) -> Option<&SyntaxReference> { function wrap (line 192) | fn wrap(text: &str, width: usize) -> String { type RenderOptions (line 201) | pub struct RenderOptions { method new (line 209) | pub(crate) fn new( type LineType (line 225) | pub enum LineType { function as_terminal_escaped (line 232) | fn as_terminal_escaped(ranges: &[(Style, &str)], truecolor: bool) -> Str... function convert_color (line 248) | fn convert_color(c: SyntectColor, truecolor: bool) -> Color { function blend_fg_color (line 266) | fn blend_fg_color(fg: SyntectColor, bg: SyntectColor) -> SyntectColor { function detect_code_block (line 282) | fn detect_code_block(line: &str) -> Option { function get_code_color (line 295) | fn get_code_color(theme: &Theme, truecolor: bool) -> Color { constant TEXT (line 311) | const TEXT: &str = r#" constant TEXT_NO_WRAP_CODE (line 322) | const TEXT_NO_WRAP_CODE: &str = r#" constant TEXT_WRAP_ALL (line 335) | const TEXT_WRAP_ALL: &str = r#" function test_render (line 350) | fn test_render() { function no_theme (line 357) | fn no_theme() { function no_wrap_code (line 365) | fn no_wrap_code() { function wrap_all (line 374) | fn wrap_all() { function test_detect_code_block (line 386) | fn test_detect_code_block() { FILE: src/render/mod.rs function render_stream (line 13) | pub async fn render_stream( function render_error (line 28) | pub fn render_error(err: anyhow::Error) { FILE: src/render/stream.rs function markdown_stream (line 17) | pub async fn markdown_stream( function raw_stream (line 35) | pub async fn raw_stream( function markdown_stream_inner (line 67) | async fn markdown_stream_inner( function gather_events (line 165) | async fn gather_events(rx: &mut UnboundedReceiver) -> Vec Result<... function split_line_tail (line 206) | fn split_line_tail(text: &str) -> (&str, &str) { function need_rows (line 214) | fn need_rows(text: &str, columns: u16) -> u16 { FILE: src/repl/completer.rs method complete (line 9) | fn complete(&mut self, line: &str, pos: usize) -> Vec { type ReplCompleter (line 82) | pub struct ReplCompleter { method new (line 89) | pub fn new(config: &GlobalConfig) -> Self { function create_suggestion (line 111) | fn create_suggestion(value: &str, description: &str, span: Span) -> Sugg... function split_line (line 127) | fn split_line(line: &str) -> Vec<(&str, usize)> { function test_split_line (line 149) | fn test_split_line() { FILE: src/repl/highlighter.rs constant DEFAULT_COLOR (line 8) | const DEFAULT_COLOR: Color = Color::Default; constant MATCH_COLOR (line 9) | const MATCH_COLOR: Color = Color::Green; type ReplHighlighter (line 11) | pub struct ReplHighlighter; method new (line 14) | pub fn new(_config: &GlobalConfig) -> Self { method highlight (line 20) | fn highlight(&self, line: &str, _cursor: usize) -> StyledText { FILE: src/repl/mod.rs constant MENU_NAME (line 32) | const MENU_NAME: &str = "completion_menu"; type Repl (line 193) | pub struct Repl { method init (line 201) | pub fn init(config: &GlobalConfig) -> Result { method run (line 215) | pub async fn run(&mut self) -> Result<()> { method create_editor (line 263) | fn create_editor(config: &GlobalConfig) -> Result { method extra_keybindings (line 294) | fn extra_keybindings(keybindings: &mut Keybindings) { method create_edit_mode (line 320) | fn create_edit_mode(config: &GlobalConfig) -> Box { method create_menu (line 333) | fn create_menu() -> ReedlineMenu { type ReplCommand (line 340) | pub struct ReplCommand { method new (line 347) | fn new(name: &'static str, desc: &'static str, state: AssertState) -> ... method is_valid (line 355) | fn is_valid(&self, flags: StateFlags) -> bool { type ReplValidator (line 361) | struct ReplValidator; method validate (line 364) | fn validate(&self, line: &str) -> ValidationResult { function run_repl_command (line 374) | pub async fn run_repl_command( function ask (line 720) | async fn ask( function unknown_command (line 761) | fn unknown_command() -> Result<()> { function dump_repl_help (line 765) | fn dump_repl_help() { function parse_command (line 780) | fn parse_command(line: &str) -> Option<(&str, Option<&str>)> { function split_first_arg (line 792) | fn split_first_arg(args: Option<&str>) -> Option<(&str, Option<&str>)> { function split_args_text (line 799) | pub fn split_args_text(line: &str, is_win: bool) -> (Vec, &str) { function test_process_command_line (line 876) | fn test_process_command_line() { function test_split_args_text (line 895) | fn test_split_args_text() { FILE: src/repl/prompt.rs type ReplPrompt (line 7) | pub struct ReplPrompt { method new (line 12) | pub fn new(config: &GlobalConfig) -> Self { method render_prompt_left (line 20) | fn render_prompt_left(&self) -> Cow<'_, str> { method render_prompt_right (line 24) | fn render_prompt_right(&self) -> Cow<'_, str> { method render_prompt_indicator (line 28) | fn render_prompt_indicator(&self, _prompt_mode: reedline::PromptEditMode... method render_prompt_multiline_indicator (line 32) | fn render_prompt_multiline_indicator(&self) -> Cow<'_, str> { method render_prompt_history_search_indicator (line 36) | fn render_prompt_history_search_indicator( FILE: src/serve.rs constant DEFAULT_MODEL_NAME (line 35) | const DEFAULT_MODEL_NAME: &str = "default"; constant PLAYGROUND_HTML (line 36) | const PLAYGROUND_HTML: &[u8] = include_bytes!("../assets/playground.html"); constant ARENA_HTML (line 37) | const ARENA_HTML: &[u8] = include_bytes!("../assets/arena.html"); type AppResponse (line 39) | type AppResponse = Response>; function run (line 41) | pub async fn run(config: GlobalConfig, addr: Option) -> Result<(... type Server (line 67) | struct Server { method new (line 75) | fn new(config: &GlobalConfig) -> Self { method run (line 109) | async fn run(self: Arc, listener: TcpListener) -> Result Result { method arena_page (line 205) | fn arena_page(&self) -> Result { method list_models (line 212) | fn list_models(&self) -> Result { method list_roles (line 220) | fn list_roles(&self) -> Result { method list_rags (line 228) | fn list_rags(&self) -> Result { method search_rag (line 236) | async fn search_rag(&self, req: hyper::Request) -> Result) -> Res... method embeddings (line 470) | async fn embeddings(&self, req: hyper::Request) -> Result) -> Result String { function set_cors_header (line 637) | fn set_cors_header(res: &mut AppResponse) { function create_text_frame (line 652) | fn create_text_frame(id: &str, model: &str, created: i64, content: &str)... function create_tool_calls_frame (line 667) | fn create_tool_calls_frame( function create_done_frame (line 721) | fn create_done_frame(id: &str, model: &str, created: i64, has_tool_calls... function build_chat_completion_chunk_json (line 732) | fn build_chat_completion_chunk_json(id: &str, model: &str, created: i64,... function ret_non_stream (line 742) | fn ret_non_stream(id: &str, model: &str, created: i64, output: &ChatComp... function ret_err (line 803) | fn ret_err(err: T) -> AppResponse { function parse_messages (line 816) | fn parse_messages(message: Vec) -> Result> { function parse_tools (line 916) | fn parse_tools(tools: Option>) -> Result; type AbortSignalInner (line 13) | pub struct AbortSignalInner { method new (line 23) | pub fn new() -> AbortSignal { method aborted (line 30) | pub fn aborted(&self) -> bool { method aborted_ctrlc (line 40) | pub fn aborted_ctrlc(&self) -> bool { method aborted_ctrld (line 44) | pub fn aborted_ctrld(&self) -> bool { method reset (line 48) | pub fn reset(&self) { method set_ctrlc (line 53) | pub fn set_ctrlc(&self) { method set_ctrld (line 57) | pub fn set_ctrld(&self) { function create_abort_signal (line 18) | pub fn create_abort_signal() -> AbortSignal { function wait_abort_signal (line 62) | pub async fn wait_abort_signal(abort_signal: &AbortSignal) { function poll_abort_signal (line 71) | pub fn poll_abort_signal(abort_signal: &AbortSignal) -> Result { FILE: src/utils/clipboard.rs function set_text (line 12) | pub fn set_text(text: &str) -> anyhow::Result<()> { function set_text_osc52 (line 27) | fn set_text_osc52(text: &str) -> anyhow::Result<()> { function set_text (line 42) | pub fn set_text(_text: &str) -> anyhow::Result<()> { function set_text (line 47) | pub fn set_text(text: &str) -> anyhow::Result<()> { FILE: src/utils/command.rs type Shell (line 19) | pub struct Shell { method new (line 26) | pub fn new(name: &str, cmd: &str, arg: &str) -> Self { function detect_shell (line 35) | pub fn detect_shell() -> Shell { function run_command (line 81) | pub fn run_command>( function run_command_with_output (line 93) | pub fn run_command_with_output>( function run_loader_command (line 108) | pub fn run_loader_command(path: &str, extension: &str, loader_command: &... function edit_file (line 157) | pub fn edit_file(editor: &str, path: &Path) -> Result<()> { function append_to_shell_history (line 163) | pub fn append_to_shell_history(shell: &str, command: &str, exit_code: i3... function get_history_file (line 183) | fn get_history_file(shell: &str) -> Option { FILE: src/utils/crypto.rs function sha256 (line 5) | pub fn sha256(input: &str) -> String { function hmac_sha256 (line 11) | pub fn hmac_sha256(key: &[u8], msg: &str) -> Vec { function hex_encode (line 17) | pub fn hex_encode(bytes: &[u8]) -> String { function encode_uri (line 23) | pub fn encode_uri(uri: &str) -> String { function base64_encode (line 30) | pub fn base64_encode>(input: T) -> String { function base64_decode (line 33) | pub fn base64_decode>(input: T) -> Result, base64... FILE: src/utils/html_to_md.rs function html_to_md (line 5) | pub fn html_to_md(html: &str) -> String { FILE: src/utils/input.rs function read_single_key (line 8) | pub fn read_single_key(valid_chars: &[char], default: char, prompt: &str... FILE: src/utils/loader.rs constant EXTENSION_METADATA (line 8) | pub const EXTENSION_METADATA: &str = "__extension__"; type DocumentMetadata (line 10) | pub type DocumentMetadata = IndexMap; type LoadedDocument (line 13) | pub struct LoadedDocument { method new (line 21) | pub fn new(path: String, contents: String, metadata: DocumentMetadata)... function load_recursive_url (line 30) | pub async fn load_recursive_url( function load_file (line 57) | pub async fn load_file(loaders: &HashMap, path: &str) ->... function load_url (line 65) | pub async fn load_url(loaders: &HashMap, path: &str) -> ... function load_plain (line 72) | async fn load_plain(path: &str, extension: &str) -> Result, path: &str)... function load_protocol_path (line 93) | pub fn load_protocol_path( FILE: src/utils/mod.rs function now (line 49) | pub fn now() -> String { function now_timestamp (line 53) | pub fn now_timestamp() -> i64 { function get_env_name (line 57) | pub fn get_env_name(key: &str) -> String { function normalize_env_name (line 61) | pub fn normalize_env_name(value: &str) -> String { function parse_bool (line 65) | pub fn parse_bool(value: &str) -> Option { function estimate_token_length (line 73) | pub fn estimate_token_length(text: &str) -> usize { function strip_think_tag (line 91) | pub fn strip_think_tag(text: &str) -> Cow<'_, str> { function extract_code_block (line 95) | pub fn extract_code_block(text: &str) -> &str { function convert_option_string (line 103) | pub fn convert_option_string(value: &str) -> Option { function fuzzy_filter (line 111) | pub fn fuzzy_filter(values: Vec, get: F, pattern: &str) -> Vec function pretty_error (line 127) | pub fn pretty_error(err: &anyhow::Error) -> String { function indent_text (line 145) | pub fn indent_text(s: T, size: usize) -> String { function error_text (line 154) | pub fn error_text(input: &str) -> String { function warning_text (line 158) | pub fn warning_text(input: &str) -> String { function color_text (line 162) | pub fn color_text(input: &str, color: nu_ansi_term::Color) -> String { function dimmed_text (line 172) | pub fn dimmed_text(input: &str) -> String { function multiline_text (line 179) | pub fn multiline_text(input: &str) -> String { function temp_file (line 194) | pub fn temp_file(prefix: &str, suffix: &str) -> PathBuf { function is_url (line 203) | pub fn is_url(path: &str) -> bool { function set_proxy (line 207) | pub fn set_proxy( function decode_bin (line 219) | pub fn decode_bin(data: &[u8]) -> Result... function test_safe_join_path (line 230) | fn test_safe_join_path() { function test_safe_join_path (line 241) | fn test_safe_join_path() { FILE: src/utils/path.rs function safe_join_path (line 7) | pub fn safe_join_path, T2: AsRef>( function expand_glob_paths (line 33) | pub async fn expand_glob_paths>( function list_file_names (line 52) | pub fn list_file_names>(dir: T, ext: &str) -> Vec { function get_patch_extension (line 69) | pub fn get_patch_extension(path: &str) -> Option { function to_absolute_path (line 75) | pub fn to_absolute_path(path: &str) -> Result { function resolve_home_dir (line 79) | pub fn resolve_home_dir(path: &str) -> String { function parse_glob (line 89) | fn parse_glob(path_str: &str) -> Result<(String, Option>, bo... function list_files (line 155) | async fn list_files( function add_file (line 187) | fn add_file(files: &mut IndexSet, suffixes: Option<&Vec>... function is_valid_extension (line 196) | fn is_valid_extension(suffixes: Option<&Vec>, path: &Path) -> bo... function test_parse_glob (line 213) | fn test_parse_glob() { FILE: src/utils/render_prompt.rs function render_prompt (line 11) | pub fn render_prompt(template: &str, variables: &HashMap<&str, String>) ... function parse_template (line 16) | fn parse_template(template: &str) -> Vec { function parse_block (line 50) | fn parse_block(current: &mut Vec) -> Expr { function eval_exprs (line 68) | fn eval_exprs(exprs: &[Expr], variables: &HashMap<&str, String>) -> Stri... function add_text (line 105) | fn add_text(exprs: &mut Vec, current: &mut Vec) { function truly (line 113) | fn truly(value: &str) -> bool { type Expr (line 118) | enum Expr { type BlockType (line 125) | enum BlockType { function test_render (line 144) | fn test_render() { FILE: src/utils/request.rs constant URL_LOADER (line 20) | pub const URL_LOADER: &str = "url"; constant RECURSIVE_URL_LOADER (line 21) | pub const RECURSIVE_URL_LOADER: &str = "recursive_url"; constant MEDIA_URL_EXTENSION (line 23) | pub const MEDIA_URL_EXTENSION: &str = "media_url"; constant DEFAULT_EXTENSION (line 24) | pub const DEFAULT_EXTENSION: &str = "txt"; constant MAX_CRAWLS (line 26) | const MAX_CRAWLS: usize = 5; constant BREAK_ON_ERROR (line 27) | const BREAK_ON_ERROR: bool = false; constant USER_AGENT (line 28) | const USER_AGENT: &str = "curl/8.6.0"; function fetch (line 60) | pub async fn fetch(url: &str) -> Result { function fetch_with_loaders (line 70) | pub async fn fetch_with_loaders( function fetch_models (line 169) | pub async fn fetch_models(api_base: &str, api_key: Option<&str>) -> Resu... type CrawlOptions (line 196) | pub struct CrawlOptions { method preset (line 203) | pub fn preset(start_url: &str) -> CrawlOptions { function crawl_website (line 213) | pub async fn crawl_website(start_url: &str, options: CrawlOptions) -> Re... type Page (line 300) | pub struct Page { function crawl_gh_tree (line 305) | async fn crawl_gh_tree(start_url: &Url, exclude: &[String]) -> Result bool { function normalize_start_url (line 446) | fn normalize_start_url(start_url: &Url) -> Url { function match_link (line 458) | fn match_link(path: &str, link: &str) -> bool { FILE: src/utils/spinner.rs type SpinnerInner (line 19) | pub struct SpinnerInner { constant DATA (line 25) | const DATA: [&'static str; 10] = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "... method step (line 27) | fn step(&mut self) -> Result<()> { method set_message (line 44) | fn set_message(&mut self, message: String) -> Result<()> { method clear_message (line 52) | fn clear_message(&mut self) -> Result<()> { type Spinner (line 70) | pub struct Spinner(mpsc::UnboundedSender); method create (line 73) | pub fn create(message: &str) -> (Self, UnboundedReceiver) { method set_message (line 80) | pub fn set_message(&self, message: String) -> Result<()> { method stop (line 86) | pub fn stop(&self) { type SpinnerEvent (line 92) | pub enum SpinnerEvent { function spawn_spinner (line 97) | pub fn spawn_spinner(message: &str) -> Spinner { function abortable_run_with_spinner (line 128) | pub async fn abortable_run_with_spinner( function abortable_run_with_spinner_rx (line 140) | pub async fn abortable_run_with_spinner_rx( function run_abortable_spinner (line 178) | async fn run_abortable_spinner( FILE: src/utils/variables.rs function interpolate_variables (line 6) | pub fn interpolate_variables(text: &mut String) {