From 8720d46f8f8bacc38d4f6029e9f2dfb4247eeb0e Mon Sep 17 00:00:00 2001 From: Diwank Singh Tomer Date: Fri, 18 Oct 2024 14:51:04 -0400 Subject: [PATCH 1/2] fix(agents-api): Fix search stuff (#695) Signed-off-by: Diwank Singh Tomer ---- > [!IMPORTANT] > Add `clean` option to `extract_keywords` and filter empty queries in `nlp.py`; update imports and defaults in `utils.py`. > > - **Behavior**: > - Add `clean` parameter to `extract_keywords()` in `nlp.py` to optionally strip non-alphanumeric characters. > - Filter out empty queries in `paragraph_to_custom_queries()` in `nlp.py`. > - **Imports**: > - Add `debug` to imports in `utils.py`. > - **Function Defaults**: > - Change default `only_on_error` to `True` in `cozo_query()` in `utils.py`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral) for ca38891eea7402f6b7f5fd3f57b90c5533b3ab3c. It will automatically update as commits are pushed. Signed-off-by: Diwank Singh Tomer --- agents-api/agents_api/common/nlp.py | 7 ++++++- agents-api/agents_api/models/utils.py | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/agents-api/agents_api/common/nlp.py b/agents-api/agents_api/common/nlp.py index 2fec5242..bc4d3338 100644 --- a/agents-api/agents_api/common/nlp.py +++ b/agents-api/agents_api/common/nlp.py @@ -8,13 +8,14 @@ nlp = spacy.load("en_core_web_sm") -def extract_keywords(text: str, top_n: int = 10) -> list[str]: +def extract_keywords(text: str, top_n: int = 10, clean: bool = True) -> list[str]: """ Extracts significant keywords and phrases from the text. Args: text (str): The input text to process. top_n (int): Number of top keywords to extract based on frequency. + clean (bool): Strip non-alphanumeric characters from keywords. Returns: List[str]: A list of extracted keywords/phrases. @@ -46,6 +47,9 @@ def extract_keywords(text: str, top_n: int = 10) -> list[str]: # Get top_n keywords keywords = [item for item, count in freq.most_common(top_n)] + if clean: + keywords = [re.sub(r"[^\w\s\-_]+", "", kw) for kw in keywords] + return keywords @@ -212,5 +216,6 @@ def paragraph_to_custom_queries(paragraph: str) -> list[str]: """ queries = [text_to_custom_query(sentence.text) for sentence in nlp(paragraph).sents] + queries = [q for q in queries if q] return queries diff --git a/agents-api/agents_api/models/utils.py b/agents-api/agents_api/models/utils.py index e182de07..0b0c41ed 100644 --- a/agents-api/agents_api/models/utils.py +++ b/agents-api/agents_api/models/utils.py @@ -8,7 +8,7 @@ from pydantic import BaseModel from ..common.utils.cozo import uuid_int_list_to_uuid4 -from ..env import do_verify_developer, do_verify_developer_owns_resource +from ..env import debug, do_verify_developer, do_verify_developer_owns_resource P = ParamSpec("P") T = TypeVar("T") @@ -185,8 +185,8 @@ def make_cozo_json_query(fields): def cozo_query( func: Callable[P, tuple[str | list[str | None], dict]] | None = None, - debug: bool | None = None, - only_on_error: bool = False, + debug: bool | None = debug, + only_on_error: bool = True, ): def cozo_query_dec(func: Callable[P, tuple[str | list[Any], dict]]): """ From 81df5be4e3fd19438df12d5245beb2b738ec3b30 Mon Sep 17 00:00:00 2001 From: Ahmad Haidar <91780764+Ahmad-mtos@users.noreply.github.com> Date: Fri, 18 Oct 2024 22:08:27 +0300 Subject: [PATCH 2/2] hotfix: Fix agent.about in jinja templates (#694) While reviewing the codebase, I noticed this bug in Jinja template. ---- > [!IMPORTANT] > Fixes Jinja template bug by replacing `agent.name` with `agent.about` in relevant files. > > - **Bug Fix**: > - Corrects Jinja template variable from `agent.name` to `agent.about` in `default_system_template.md`, `julep-concepts.md`, and `constants.tsp`. > - Ensures `agent.about` is correctly displayed in templates when available. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral) for 463a0e6f3b33ea918ba045aac1ae247dbfc23176. It will automatically update as commits are pushed. --- agents-api/agents_api/autogen/Sessions.py | 10 +++++----- docs/explanation/default_system_template.md | 2 +- docs/julep-concepts.md | 2 +- typespec/common/constants.tsp | 2 +- .../tsp-output/@typespec/openapi3/openapi-0.4.0.yaml | 10 +++++----- .../tsp-output/@typespec/openapi3/openapi-1.0.0.yaml | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/agents-api/agents_api/autogen/Sessions.py b/agents-api/agents_api/autogen/Sessions.py index 75e5252c..858c8a5a 100644 --- a/agents-api/agents_api/autogen/Sessions.py +++ b/agents-api/agents_api/autogen/Sessions.py @@ -27,7 +27,7 @@ class CreateSessionRequest(BaseModel): Agent ID of agent associated with this session """ agents: list[UUID] | None = None - situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' + situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.about}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ @@ -64,7 +64,7 @@ class PatchSessionRequest(BaseModel): model_config = ConfigDict( populate_by_name=True, ) - situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' + situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.about}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ @@ -97,7 +97,7 @@ class Session(BaseModel): model_config = ConfigDict( populate_by_name=True, ) - situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' + situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.about}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ @@ -174,7 +174,7 @@ class UpdateSessionRequest(BaseModel): model_config = ConfigDict( populate_by_name=True, ) - situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' + situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.about}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ @@ -218,7 +218,7 @@ class CreateOrUpdateSessionRequest(CreateSessionRequest): Agent ID of agent associated with this session """ agents: list[UUID] | None = None - situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' + situation: str = '{%- if agent.name -%}\nYou are {{agent.name}}.{{" "}}\n{%- endif -%}\n\n{%- if agent.about -%}\nAbout you: {{agent.about}}.{{" "}}\n{%- endif -%}\n\n{%- if user -%}\nYou are talking to a user\n {%- if user.name -%}{{" "}} and their name is {{user.name}}\n {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%}\n {%- endif -%}\n{%- endif -%}\n\n{{"\n\n"}}\n\n{%- if agent.instructions -%}\nInstructions:{{"\n"}}\n {%- if agent.instructions is string -%}\n {{agent.instructions}}{{"\n"}}\n {%- else -%}\n {%- for instruction in agent.instructions -%}\n - {{instruction}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"\n"}}\n{%- endif -%}\n\n{%- if tools -%}\nTools:{{"\n"}}\n {%- for tool in tools -%}\n {%- if tool.type == "function" -%}\n - {{tool.function.name}}\n {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{"\n"}}\n {%- else -%}\n - {{ 0/0 }} {# Error: Other tool types aren\'t supported yet. #}\n {%- endif -%}\n {%- endfor -%}\n{{"\n\n"}}\n{%- endif -%}\n\n{%- if docs -%}\nRelevant documents:{{"\n"}}\n {%- for doc in docs -%}\n {{doc.title}}{{"\n"}}\n {%- if doc.content is string -%}\n {{doc.content}}{{"\n"}}\n {%- else -%}\n {%- for snippet in doc.content -%}\n {{snippet}}{{"\n"}}\n {%- endfor -%}\n {%- endif -%}\n {{"---"}}\n {%- endfor -%}\n{%- endif -%}' """ A specific situation that sets the background for this session """ diff --git a/docs/explanation/default_system_template.md b/docs/explanation/default_system_template.md index 4ba74b2a..c9885669 100644 --- a/docs/explanation/default_system_template.md +++ b/docs/explanation/default_system_template.md @@ -15,7 +15,7 @@ You are {{agent.name}}.{{" "}} {%- endif -%} {%- if agent.about -%} -About you: {{agent.name}}.{{" "}} +About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} diff --git a/docs/julep-concepts.md b/docs/julep-concepts.md index b6fc945d..477e6acc 100644 --- a/docs/julep-concepts.md +++ b/docs/julep-concepts.md @@ -391,7 +391,7 @@ You are {{agent.name}}.{{" "}} {%- endif -%} {%- if agent.about -%} -About you: {{agent.name}}.{{" "}} +About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} diff --git a/typespec/common/constants.tsp b/typespec/common/constants.tsp index e6032975..524a2c14 100644 --- a/typespec/common/constants.tsp +++ b/typespec/common/constants.tsp @@ -10,7 +10,7 @@ You are {{agent.name}}.{{" "}} {%- endif -%} {%- if agent.about -%} -About you: {{agent.name}}.{{" "}} +About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml index cebe19ff..8b2d122d 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml @@ -3184,7 +3184,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3316,7 +3316,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3470,7 +3470,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3589,7 +3589,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3771,7 +3771,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml index 95d50b77..6ac6cd70 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml @@ -3184,7 +3184,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3316,7 +3316,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3470,7 +3470,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3589,7 +3589,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} @@ -3771,7 +3771,7 @@ components: {%- endif -%} {%- if agent.about -%} - About you: {{agent.name}}.{{" "}} + About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%}