Show spinner while thinking

Instead of dots.
This commit is contained in:
Willem van den Ende 2025-05-01 19:07:07 +01:00
parent e2f6f4e15a
commit 6f7735f70f
3 changed files with 42 additions and 5 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ wheels/
# Virtual environments
.venv
/workspace/tools/
.aider*

View File

@ -5,8 +5,8 @@ from qwen_agent.agents import Assistant
# Define LLM
llm_cfg = {
# 'model': 'hf.co/unsloth/Qwen3-30B-A3B-GGUF:Q5_K_M',
'model': 'qwen3:32b',
'model': 'hf.co/unsloth/Qwen3-30B-A3B-GGUF:Q5_K_M',
# 'model': 'qwen3:32b',
# Use a custom endpoint compatible with OpenAI API:
'model_server': 'http://localhost:11434/v1', # api_base
@ -48,9 +48,9 @@ console = Console()
messages = [{'role': 'user',
'content':
""""
- ***Research** Kagi search, privacy and company investors and financials.
-- **Analyze** Recent developments around Kagi.
-- **Answer** Is it a company that I can trust with my money and data?"""}]
- ***Research** Parsing CLI commands and options in python code.
-- **Analyze** Clean separation of concerns between parsing commands and options and execution of the commands.
-- **Answer** What is the best way to parse CLI commands and options in python code?"""}]
final_responses = None
# Consider adding error handling around bot.run

36
uv.lock generated
View File

@ -1016,6 +1016,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/4c/fa/be89a49c640930180657482a74970cdcf6f7072c8d2471e1babe17a222dc/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:be4816dc51c8a471749d664161b434912eee82f2ea66bd7628bd14583a833e85", size = 2349213 },
]
[[package]]
name = "markdown-it-py"
version = "3.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "mdurl" },
]
sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528 },
]
[[package]]
name = "markupsafe"
version = "3.0.2"
@ -1106,6 +1118,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/10/30/20a7f33b0b884a9d14dd3aa94ff1ac9da1479fe2ad66dd9e2736075d2506/mcp-1.6.0-py3-none-any.whl", hash = "sha256:7bd24c6ea042dbec44c754f100984d186620d8b841ec30f1b19eda9b93a634d0", size = 76077 },
]
[[package]]
name = "mdurl"
version = "0.1.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979 },
]
[[package]]
name = "mistune"
version = "3.1.3"
@ -1791,6 +1812,7 @@ dependencies = [
{ name = "python-dateutil" },
{ name = "python-dotenv" },
{ name = "qwen-agent", extra = ["code-interpreter"] },
{ name = "rich" },
]
[package.metadata]
@ -1801,6 +1823,7 @@ requires-dist = [
{ name = "python-dateutil", specifier = ">=2.9.0.post0" },
{ name = "python-dotenv", specifier = ">=1.1.0" },
{ name = "qwen-agent", extras = ["code-interpreter"], specifier = ">=0.0.20" },
{ name = "rich", specifier = ">=13.7.0" },
]
[[package]]
@ -1875,6 +1898,19 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/9e/51/17023c0f8f1869d8806b979a2bffa3f861f26a3f1a66b094288323fba52f/rfc3986_validator-0.1.1-py2.py3-none-any.whl", hash = "sha256:2f235c432ef459970b4306369336b9d5dbdda31b510ca1e327636e01f528bfa9", size = 4242 },
]
[[package]]
name = "rich"
version = "14.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "markdown-it-py" },
{ name = "pygments" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725", size = 224078 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0d/9b/63f4c7ebc259242c89b3acafdb37b41d1185c07ff0011164674e9076b491/rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0", size = 243229 },
]
[[package]]
name = "rpds-py"
version = "0.24.0"