mirror of
https://github.com/katanemo/plano.git
synced 2026-07-05 15:52:12 +02:00
added the state_storage_v1_responses flag, and use that to store state appropriately
This commit is contained in:
parent
142aaabc10
commit
1212b526b8
8 changed files with 134 additions and 10 deletions
|
|
@ -148,6 +148,20 @@ def get_llm_provider_access_keys(arch_config_file):
|
|||
if access_key is not None:
|
||||
access_key_list.append(access_key)
|
||||
|
||||
# Extract environment variables from state_storage.connection_string
|
||||
state_storage = arch_config_yaml.get("state_storage_v1_responses")
|
||||
if state_storage:
|
||||
connection_string = state_storage.get("connection_string")
|
||||
if connection_string and isinstance(connection_string, str):
|
||||
# Extract all $VAR and ${VAR} patterns from connection string
|
||||
import re
|
||||
|
||||
# Match both $VAR and ${VAR} patterns
|
||||
pattern = r"\$\{?([A-Z_][A-Z0-9_]*)\}?"
|
||||
matches = re.findall(pattern, connection_string)
|
||||
for var in matches:
|
||||
access_key_list.append(f"${var}")
|
||||
|
||||
return access_key_list
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue