You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Embedding and LLM defaults: `serverag` vs segment keys
150
+
151
+
Several components resolve embedding and chat model defaults from `get_config()`. Two naming patterns appear in configuration:
152
+
153
+
-**Segment defaults** — `LLMEmbed` and `LLMPrompt` fall back to these keys when `model` / `source` arguments are omitted: `default_embedding_model_name`, `default_embedding_model_source`, `default_model_name`, and `default_model_source` (see `talkpipe.util.constants`).
154
+
-**`serverag` defaults** — When you omit `--embedding_model`, `--embedding_source`, `--completion_model`, and `--completion_source`, `serverag` reads `DEFAULT_EMBEDDING_MODEL`, `DEFAULT_EMBEDDING_SOURCE`, `DEFAULT_LLM_MODEL`, and `DEFAULT_LLM_SOURCE` from the merged config. If those keys are unset, `serverag` passes `None` into the RAG pipeline, and the segments above apply their `default_*` fallbacks.
155
+
156
+
Use **`default_*`** in `~/.talkpipe.toml` for one consistent set of defaults across pipelines. Use **`DEFAULT_*`** when you want values applied at the `serverag` CLI layer (still overridable per invocation). Environment variables use the usual `TALKPIPE_` prefix and map to the exact key name after the prefix (for example, `TALKPIPE_default_model_name` or `TALKPIPE_DEFAULT_LLM_MODEL`).
157
+
149
158
### ChatterLang Script Variable Access
150
159
151
160
**Configuration Variables** (accessed with `$key` syntax in scripts):
***Unit** - A component in a pipeline that either produces or processes data. There are two types of units, Source, and Segments.
7
+
***Unit** - A component in a pipeline that either produces or processes data. There are two types of units: Sources and Segments.
8
8
***Segment** - A unit that reads from another Unit and may or may not yield data of its own. All units that
9
-
are not at the start of a pipeline is a Segment.
9
+
are not at the start of a pipeline are Segments.
10
10
***Source** - A unit that takes nothing as input and yields data items. These Units are used in the
11
11
"INPUT FROM..." portion of a pipeline.
12
12
@@ -24,9 +24,9 @@ The following are the main breakdown of the codebase. These should be considered
24
24
* Example: chatterlang_script
25
25
***talkpipe.operations** - Contains general algorithm implementations. Associated segments and sources can be included next to the algorithm implementations, but the algorithms themselves should also work stand-alone.
26
26
* Example: bloom filters
27
-
***talkpipe.data** - Contain components having to do with complex, type-specific data manipulation.
27
+
***talkpipe.data** - Contains components having to do with complex, type-specific data manipulation.
28
28
* Example: extracting text from files.
29
-
***talkpipe.llm** - Contain the abstract classes and implementations for accessing LLMs, both code for accessing specific LLMs and code for doing prompting.
29
+
***talkpipe.llm** - Contains the abstract classes and implementations for accessing LLMs, both code for accessing specific LLMs and code for doing prompting.
30
30
* Example: Code for talking with Ollama or OpenAI
31
31
***talkpipe.pipe** - Code that implements the core classes and decorators for the pipe api as well and misc implementations of helper segments and sources.
32
32
* Example: echo and the definition of the @segment decorator
@@ -58,7 +58,7 @@ These parameter names should behave consistently across all units:
58
58
If used, any processed output is attached to the original data using bracket notation. The original item is then emitted.
59
59
60
60
-**fail_on_error**
61
-
If True, an operation the exception should be raised, likely aborting the pipeline. If False, the operation should continue
61
+
If True, the exception should be raised, likely aborting the pipeline. If False, the operation should continue
62
62
and either None should be yielded or nothing, depending on the segment or source. A warning message should be logged.
63
63
64
64
-**field**
@@ -68,7 +68,7 @@ These parameter names should behave consistently across all units:
68
68
-**field_list**
69
69
Specifies that a list of fields can or should be provided, with each field separated
70
70
by a comma. In some cases, each field needs to be mapped to some other name. In
71
-
those case, the field and name should be separated by a colon. In field_lists,
71
+
those cases, the field and name should be separated by a colon. In field_lists,
72
72
the underscore (_) refers to the item as a whole.
73
73
- For example, "X.2.0:SomeName,X.1:SomeOtherName". If no "name" is provided,
74
74
the fieldname itself is used. Where only a list of fields is needed and no names,
@@ -88,11 +88,9 @@ After talkpipe is installed, a script called "chatterlang_reference_browser" is
88
88
89
89
### Standard Configuration File Items
90
90
91
-
Configuration constants can be defined either in ~/.talkpipe.toml or in environment variables. Any constant defined in an environment variable needs to be prefixed with TALKPIPE_. So email_password, stored in an environment variable, needs to be TALKPIPE_email_password. Note that in Chatterlang, any variable stored in the format
92
-
can be specified as a parameter using $var_name. This will get dereferenced to
93
-
the environment variable TALKPIPE_var_name or var_name in talkpipe.toml.
91
+
Configuration constants can be defined either in ~/.talkpipe.toml or in environment variables. Any constant defined in an environment variable needs to be prefixed with TALKPIPE_. So email_password, stored in an environment variable, needs to be TALKPIPE_email_password. Note that in ChatterLang, any key defined in ~/.talkpipe.toml or set via a TALKPIPE_* environment variable can be referenced in scripts as a parameter using $var_name. That reference resolves to the environment variable TALKPIPE_var_name or to var_name in talkpipe.toml.
94
92
95
-
***default_embedding_source** - The default source (e.g. ollama) to be used for creating sentence embeddings.
93
+
***default_embedding_model_source** - The default source (e.g. ollama) to be used for creating sentence embeddings.
96
94
***default_embedding_model_name** - The name of the LLM model to be used for creating sentence embeddings.
97
95
***default_model_name** - The default name of a LLM model to be used in chat
98
96
***default_model_source** - The default source (e.g. ollama) to be used in chat
Copy file name to clipboardExpand all lines: docs/guides/makevectordatabase-and-serverag.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Together they form a minimal path from raw documents to a queryable RAG interfac
19
19
20
20
## Prerequisites
21
21
22
-
-**TalkPipe** with LLM support: `pip install talkpipe[ollama]` or `talkpipe[all]`
22
+
-**TalkPipe** with LLM support: `pip install talkpipe[ollama]` or `pip install talkpipe[all]`
23
23
-**Embedding model**: Ollama with an embedding model (e.g. `ollama pull mxbai-embed-large`)
24
24
-**Completion model** (for serverag): Ollama with an LLM (e.g. `ollama pull llama3.2`)
25
25
-**Configuration**: Set `DEFAULT_EMBEDDING_MODEL`, `DEFAULT_EMBEDDING_SOURCE`, `DEFAULT_LLM_MODEL`, and `DEFAULT_LLM_SOURCE` in `~/.talkpipe.toml` or pass them on the command line
Copy file name to clipboardExpand all lines: docs/tutorials/Tutorial_1-Document_Indexing/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ TalkPipe lets you prototype searchable document systems without external databas
27
27
28
28
## Prerequisites
29
29
30
-
-**TalkPipe** installed: See [Getting Started](../../quickstart.md) for installation. For this tutorial: `pip install talkpipe[ollama]` or `talkpipe[all]`
30
+
-**TalkPipe** installed: See [Getting Started](../../quickstart.md) for installation. For this tutorial: `pip install talkpipe[ollama]` or `pip install talkpipe[all]`
31
31
-**Step 1 only**: Ollama installed locally with the `llama3.2` model (or adjust the script to use another model)
32
32
33
33
> **Tip:** If you skip Step 1, you can use the included `stories.json` and go straight to Step 2.
0 commit comments