mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 04:12:45 +02:00
Merge branch 'fixbug/env_key' into 'mgx_ops'
fixbug: linux环境变量key不能使用- See merge request pub/MetaGPT!302
This commit is contained in:
commit
6e0990f251
2 changed files with 6 additions and 2 deletions
|
|
@ -152,7 +152,7 @@ Respond with a concise thought, then provide the appropriate response category:
|
|||
"""
|
||||
|
||||
|
||||
QUICK_THINK_EXAMPLES ="""
|
||||
QUICK_THINK_EXAMPLES = """
|
||||
# Example
|
||||
|
||||
1. Request: "How do I design an online document editing platform that supports real-time collaboration?"
|
||||
|
|
@ -190,4 +190,4 @@ Response Category: AMBIGUOUS.
|
|||
# Instruction
|
||||
"""
|
||||
|
||||
QUICK_THINK_PROMPT = QUICK_THINK_PROMPT.format(examples=QUICK_THINK_EXAMPLES)
|
||||
QUICK_THINK_PROMPT = QUICK_THINK_PROMPT.format(examples=QUICK_THINK_EXAMPLES)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ async def default_get_env(key: str, app_name: str = None) -> str:
|
|||
if app_key in os.environ:
|
||||
return os.environ[app_key]
|
||||
|
||||
env_app_key = app_key.replace("-", "_") # "-" is not supported by linux environment variable
|
||||
if env_app_key in os.environ:
|
||||
return os.environ[env_app_key]
|
||||
|
||||
from metagpt.context import Context
|
||||
|
||||
context = Context()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue