Commit Graph

19 Commits

Author SHA1 Message Date
5a603a7fd4 Implemented the configurable stream delay feature for
the reasoning models using ReasoningChatModel Custom Class.

1. Added the STREAM_DELAY parameter to the sample.config.toml file:

[MODELS.DEEPSEEK]
API_KEY = ""
STREAM_DELAY = 20  # Milliseconds between token emissions for reasoning models (higher = slower, 0 = no delay)

2. Updated the Config interface in src/config.ts to include the new parameter:

DEEPSEEK: {
  API_KEY: string;
  STREAM_DELAY: number;
};

3. Added a getter function in src/config.ts to retrieve the configured value:

export const getDeepseekStreamDelay = () =>
  loadConfig().MODELS.DEEPSEEK.STREAM_DELAY || 20; // Default to 20ms if not specified
Updated the deepseek.ts provider to use the configured stream delay:

const streamDelay = getDeepseekStreamDelay();
logger.debug(`Using stream delay of ${streamDelay}ms for ${model.id}`);

// Then using it in the model configuration
model: new ReasoningChatModel({
  // ...other params
  streamDelay
}),

4. This implementation provides several benefits:

-User-Configurable: Users can now adjust the stream delay without modifying code
-Descriptive Naming: The parameter name "STREAM_DELAY" clearly indicates its purpose
-Documented: The comment in the config file explains what the parameter does
-Fallback Default: If not specified, it defaults to 20ms
-Logging: Added debug logging to show the configured value when loading models

To adjust the stream delay, users can simply modify the STREAM_DELAY value in
their config.toml file. Higher values will slow down token generation
(making it easier to read in real-time), while lower values will speed it up.
 Setting it to 0 will disable the delay entirely.
2025-02-26 00:03:36 +04:00
a6e4402616 Add DeepSeek and LMStudio providers
- Integrate DeepSeek and LMStudio AI providers
- Add message processing utilities for improved handling
- Implement reasoning panel for message actions
- Add logging functionality to UI
- Update configurations and dependencies
2025-02-25 08:53:53 +04:00
4b89008f3a feat(app): add file uploads 2024-11-23 15:04:19 +05:30
9f88d16ef1 feat(docker-compose): use env vars from compose 2024-10-02 22:54:00 +05:30
fc5e35b1b1 feat(docker): add prebuilt images 2024-10-02 21:59:40 +05:30
07e5615860 feat(docker-compose): link config.toml as vol. 2024-09-04 18:54:54 +05:30
799f4d6aee feat(docker-compose): implement data volume 2024-06-29 11:10:26 +05:30
8e18c32e23 Merge branch 'pr/137' 2024-06-01 10:52:34 +05:30
5f6e61d7a0 feat(docker-compose): remove extra hosts from frontend 2024-06-01 10:51:56 +05:30
f4628ae52d feat(docker-compose): update docker-compose.yaml with restart policy 2024-05-30 18:12:22 +08:00
382fa295e5 fix: add extra_hosts to docker-compose.yaml to allow connection to ollama 2024-05-24 08:19:15 -07:00
0993c5a760 feat(app): revert port & network changes 2024-05-13 19:58:17 +05:30
100872f2d9 feat(docker-compose): revert network changes 2024-05-12 14:04:05 +05:30
b622df5a9f feat(docker-compose): update ports, change network type 2024-05-12 12:16:08 +05:30
7eace1e6bd feat(searxng-container): bind mount & add limiter 2024-05-10 20:55:08 +05:30
9a7af945b0 lint 2024-05-09 20:43:04 +05:30
e042ff491b feat(compose): remove expose directive 2024-05-07 19:39:59 +05:30
99ae8f6998 feat(agents): embed docs & query together
Embed documents and query together to reduce the time taken for retrieving the sources ~1 seconds.
2024-04-24 10:08:40 +05:30
d1c74c861e Initial commit 2024-04-09 16:21:05 +05:30