Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getting a TEMPLATE from an environment variable #354

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add getting a TEMPLATE from an environment variable
HardAndHeavy committed Dec 1, 2024
commit 3af8b1310f239be17be63f4fa35ec71aa78d1c13
4 changes: 2 additions & 2 deletions blueprints/function_calling_blueprint.py
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ def __init__(self, prompt: str | None = None) -> None:
),
"OPENAI_API_KEY": os.getenv("OPENAI_API_KEY", "YOUR_OPENAI_API_KEY"),
"TASK_MODEL": os.getenv("TASK_MODEL", "gpt-3.5-turbo"),
"TEMPLATE": """Use the following context as your learned knowledge, inside <context></context> XML tags.
"TEMPLATE": os.getenv("TEMPLATE", """Use the following context as your learned knowledge, inside <context></context> XML tags.
<context>
{{CONTEXT}}
</context>
@@ -71,7 +71,7 @@ def __init__(self, prompt: str | None = None) -> None:
- If you don't know, just say that you don't know.
- If you don't know when you are not sure, ask for clarification.
Avoid mentioning that you obtained the information from the context.
And answer according to the language of the user's question.""",
And answer according to the language of the user's question."""),
}
)