Skip to content

Commit b388f6c

Browse files
committed
Bump LlamaIndex version. Remove context workaround.
1 parent 00a0734 commit b388f6c

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

  • agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/src

agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/src/stack.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010

1111

1212
class {{ cookiecutter.project_metadata.class_name }}Stack:
13-
def _format_history(self, history: list[ChatMessage]) -> str:
14-
# ideally we would pass these directly to `chat_history`, but passing
15-
# messages directly overrides the system prompt. this allows us to
16-
# pass them as a string to `user_msg`.
17-
return "\n\n".join([f"{msg.role}: {msg.content}" for msg in history])
1813

1914
async def run(self, inputs: dict[str, str]):
2015
# TODO interpolate inputs into prompts
@@ -27,8 +22,7 @@ async def run(self, inputs: dict[str, str]):
2722
)
2823
history.append(task())
2924
handler = workflow.run(
30-
user_msg=self._format_history(history),
31-
# chat_history=history,
25+
chat_history=history,
3226
)
3327

3428
async for event in handler.stream_events():

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ openai_swarm = [
5656
"agentstack-openai-swarm>=0.0.1"
5757
]
5858
llamaindex = [
59-
"llama-index-core>=0.12.15"
59+
"llama-index-core>=0.12.16"
6060
]
6161

6262
[tool.setuptools.package-data]

0 commit comments

Comments
 (0)