mirror of
https://github.com/SilasMarvin/lsp-ai.git
synced 2025-12-17 22:44:24 +01:00
Tests passing
This commit is contained in:
@@ -105,7 +105,7 @@ pub enum VectorDataType {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct VectorStore {
|
||||
pub(crate) struct VectorStore {
|
||||
pub crawl: Option<Crawl>,
|
||||
#[serde(default)]
|
||||
pub splitter: ValidSplitter,
|
||||
@@ -433,7 +433,7 @@ impl Config {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default_with_vector_store(vector_store: VectorStore) -> Self {
|
||||
pub(crate) fn default_with_vector_store(vector_store: VectorStore) -> Self {
|
||||
Self {
|
||||
config: ValidConfig {
|
||||
memory: ValidMemoryBackend::VectorStore(vector_store),
|
||||
|
||||
@@ -827,7 +827,8 @@ assert multiply_two_numbers(2, 3) == 6
|
||||
assert!(chunks.len() == 1);
|
||||
assert_eq!(
|
||||
chunks[0].text,
|
||||
r#"--file:///filler.py--\n# Multiplies two numbers
|
||||
r#"--file:///filler.py--
|
||||
# Multiplies two numbers
|
||||
def multiply_two_numbers(x, y):
|
||||
return
|
||||
|
||||
|
||||
@@ -59,11 +59,15 @@ impl GeminiContent {
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub(crate) struct GeminiGenerationConfig {
|
||||
#[serde(default)]
|
||||
#[serde(rename = "stopSequences")]
|
||||
pub(crate) stop_sequences: Vec<String>,
|
||||
#[serde(rename = "maxOutputTokens")]
|
||||
#[serde(default = "max_tokens_default")]
|
||||
pub(crate) max_output_tokens: usize,
|
||||
pub(crate) temperature: Option<f32>,
|
||||
#[serde(rename = "topP")]
|
||||
pub(crate) top_p: Option<f32>,
|
||||
#[serde(rename = "topK")]
|
||||
pub(crate) top_k: Option<f32>,
|
||||
}
|
||||
|
||||
@@ -72,7 +76,9 @@ pub(crate) struct GeminiGenerationConfig {
|
||||
#[serde(rename = "camelCase")]
|
||||
pub(crate) struct GeminiRunParams {
|
||||
contents: Vec<GeminiContent>,
|
||||
#[serde(rename = "systemInstruction")]
|
||||
system_instruction: GeminiContent,
|
||||
#[serde(rename = "generationConfig")]
|
||||
generation_config: Option<GeminiGenerationConfig>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user