Remove hardcoded Redis URL from conversation-runner.php
- Let index.php handle REDIS_URL from .env - No need to pass it through subprocess environment
This commit is contained in:
@@ -7,9 +7,11 @@
|
|||||||
*
|
*
|
||||||
* Usage: php conversation-runner.php
|
* Usage: php conversation-runner.php
|
||||||
*
|
*
|
||||||
* Environment variables (optional):
|
* Environment variables (passed to index.php):
|
||||||
* API_BASE_URL — Override endpoint (default: from conversation file)
|
* API_BASE_URL — Override endpoint (default: from conversation file)
|
||||||
* MAX_CONTEXT_TOKENS — Override context limit (default: from conversation file)
|
* MAX_CONTEXT_TOKENS — Override context limit (default: from conversation file)
|
||||||
|
*
|
||||||
|
* Note: REDIS_URL, VLLM_URL, etc. are read from .env by index.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__ . '/vendor/autoload.php';
|
require __DIR__ . '/vendor/autoload.php';
|
||||||
@@ -22,9 +24,6 @@ use ContextPaging\TokenCounter;
|
|||||||
|
|
||||||
$conversationFile = __DIR__ . '/conversations/coding-session.json';
|
$conversationFile = __DIR__ . '/conversations/coding-session.json';
|
||||||
|
|
||||||
// Redis URL for caching (optional but recommended for persistence)
|
|
||||||
$redisUrl = getenv('REDIS_URL') ?: 'REDIS_URL_FROM_ENV';
|
|
||||||
|
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// Load conversation state
|
// Load conversation state
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
@@ -138,7 +137,6 @@ $indexPhp = __DIR__ . '/index.php';
|
|||||||
$env = [
|
$env = [
|
||||||
'API_BASE_URL' => $conversation['endpoint'],
|
'API_BASE_URL' => $conversation['endpoint'],
|
||||||
'MAX_CONTEXT_TOKENS' => (string) $conversation['max_context'],
|
'MAX_CONTEXT_TOKENS' => (string) $conversation['max_context'],
|
||||||
'REDIS_URL' => $redisUrl,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Build the command
|
// Build the command
|
||||||
|
|||||||
Reference in New Issue
Block a user