mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-01 21:04:08 -04:00
0bc5a0d882
* Enhance LlamaIndexServer with next question suggestion feature - Added `suggest_next_questions` parameter to the LlamaIndexServer for suggesting follow-up questions after the assistant's response. - Updated README.md to document the new configuration option. - Introduced `SUGGEST_NEXT_QUESTION_PROMPT` in prompts.py for customizable question suggestions. - Bumped version to 0.1.16 in uv.lock to reflect the new feature. * Implement next question suggestion feature in LlamaIndexServer - Added `suggestNextQuestions` option to LlamaIndexServer for suggesting follow-up questions after the assistant's response. - Updated README.md to include the new configuration option. - Modified example workflow to utilize the new feature. - Enhanced chat handler to conditionally send suggested questions based on the new option. * add changeset * remove log * bundle ui instead of download * check test * check test check test check test check test check test check test check test check test check test check test * fix tests * Update artifact path in workflow and clarify README.md text - Changed the artifact path in the GitHub Actions workflow from `python/llama-index-server/dist/` to `dist/`. - Revised README.md to clarify the default prompt used for the `suggest_next_questions` configuration option. * support changeset for python * refactor: update llama-index-server structure and workflows * fix workflows * fix workflows * fix workflows * add changeset * fix cannot release python * Update packages/server/README.md Co-authored-by: Thuc Pham <51660321+thucpn@users.noreply.github.com> * Update starter questions in LlamaIndex App and add TODO for suggestion feature in chat API --------- Co-authored-by: Marcus Schiesser <mail@marcusschiesser.de> Co-authored-by: Thuc Pham <51660321+thucpn@users.noreply.github.com>
34 lines
973 B
Python
Executable File
34 lines
973 B
Python
Executable File
#!/usr/bin/env python3
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
def sync_versions():
|
|
# Read package.json
|
|
with open("package.json", "r") as f:
|
|
package_data = json.load(f)
|
|
npm_version = package_data["version"]
|
|
|
|
# Read pyproject.toml
|
|
pyproject_path = Path("pyproject.toml")
|
|
content = pyproject_path.read_text()
|
|
|
|
# Find the project section and update version
|
|
sections = content.split("\n\n")
|
|
for i, section in enumerate(sections):
|
|
if section.startswith("[project]"):
|
|
lines = section.split("\n")
|
|
for j, line in enumerate(lines):
|
|
if line.startswith("version = "):
|
|
lines[j] = f'version = "{npm_version}"'
|
|
sections[i] = "\n".join(lines)
|
|
break
|
|
|
|
# Write back to pyproject.toml
|
|
pyproject_path.write_text("\n\n".join(sections))
|
|
print(f"Updated pyproject.toml version to {npm_version}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sync_versions()
|