versionhq 1.2.3.6__tar.gz → 1.2.3.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/PKG-INFO +1 -1
  2. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/pyproject.toml +1 -1
  3. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/__init__.py +1 -1
  4. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/model.py +21 -10
  5. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq.egg-info/PKG-INFO +1 -1
  6. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/llm/llm_connection_test.py +2 -1
  7. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/task_test.py +2 -1
  8. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/uv.lock +7 -7
  9. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.env.sample +0 -0
  10. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.github/workflows/deploy_docs.yml +0 -0
  11. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.github/workflows/publish.yml +0 -0
  12. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.github/workflows/publish_testpypi.yml +0 -0
  13. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.github/workflows/run_tests.yml +0 -0
  14. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.github/workflows/security_check.yml +0 -0
  15. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.gitignore +0 -0
  16. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.pre-commit-config.yaml +0 -0
  17. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/.python-version +0 -0
  18. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/LICENSE +0 -0
  19. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/README.md +0 -0
  20. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/SECURITY.md +0 -0
  21. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/db/preprocess.py +0 -0
  22. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/CNAME +0 -0
  23. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/_logos/favicon.ico +0 -0
  24. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/_logos/logo192.png +0 -0
  25. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent/config.md +0 -0
  26. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent/index.md +0 -0
  27. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent/task-handling.md +0 -0
  28. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent-network/config.md +0 -0
  29. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent-network/form.md +0 -0
  30. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent-network/index.md +0 -0
  31. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/agent-network/ref.md +0 -0
  32. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/knowledge.md +0 -0
  33. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/llm/index.md +0 -0
  34. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/memory.md +0 -0
  35. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/rag-tool.md +0 -0
  36. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/evaluation.md +0 -0
  37. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/index.md +0 -0
  38. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/reference.md +0 -0
  39. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/response-field.md +0 -0
  40. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/task-execution.md +0 -0
  41. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/task-output.md +0 -0
  42. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task/task-strc-response.md +0 -0
  43. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/task-graph/index.md +0 -0
  44. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/core/tool.md +0 -0
  45. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/index.md +0 -0
  46. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/quickstart.md +0 -0
  47. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/stylesheets/main.css +0 -0
  48. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/docs/tags.md +0 -0
  49. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/mkdocs.yml +0 -0
  50. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/requirements-dev.txt +0 -0
  51. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/requirements.txt +0 -0
  52. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/runtime.txt +0 -0
  53. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/setup.cfg +0 -0
  54. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/__init__.py +0 -0
  55. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/i18n.py +0 -0
  56. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/llm_as_a_judge.py +0 -0
  57. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/logger.py +0 -0
  58. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/process_config.py +0 -0
  59. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/usage_metrics.py +0 -0
  60. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/_utils/vars.py +0 -0
  61. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  62. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  63. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/__init__.py +0 -0
  64. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/inhouse_agents.py +0 -0
  65. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/parser.py +0 -0
  66. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent/rpm_controller.py +0 -0
  67. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent_network/__init__.py +0 -0
  68. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent_network/formation.py +0 -0
  69. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/agent_network/model.py +0 -0
  70. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/cli/__init__.py +0 -0
  71. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/__init__.py +0 -0
  72. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/customer/__init__.py +0 -0
  73. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/customer/model.py +0 -0
  74. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/product/__init__.py +0 -0
  75. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/product/model.py +0 -0
  76. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/workflow/__init__.py +0 -0
  77. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/clients/workflow/model.py +0 -0
  78. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/__init__.py +0 -0
  79. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/_utils.py +0 -0
  80. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/embedding.py +0 -0
  81. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/model.py +0 -0
  82. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/source.py +0 -0
  83. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/source_docling.py +0 -0
  84. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/knowledge/storage.py +0 -0
  85. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/llm/__init__.py +0 -0
  86. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/llm/llm_vars.py +0 -0
  87. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/llm/model.py +0 -0
  88. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/memory/__init__.py +0 -0
  89. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/memory/contextual_memory.py +0 -0
  90. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/memory/model.py +0 -0
  91. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/__init__.py +0 -0
  92. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/base.py +0 -0
  93. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
  94. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/mem0_storage.py +0 -0
  95. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/rag_storage.py +0 -0
  96. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/task_output_storage.py +0 -0
  97. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/storage/utils.py +0 -0
  98. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/TEMPLATES/Description.py +0 -0
  99. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/__init__.py +0 -0
  100. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/evaluation.py +0 -0
  101. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/formatter.py +0 -0
  102. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/model.py +0 -0
  103. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task/structured_response.py +0 -0
  104. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task_graph/__init__.py +0 -0
  105. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task_graph/colors.py +0 -0
  106. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task_graph/draft.py +0 -0
  107. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/task_graph/model.py +0 -0
  108. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/__init__.py +0 -0
  109. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/cache_handler.py +0 -0
  110. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/composio_tool.py +0 -0
  111. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/composio_tool_vars.py +0 -0
  112. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/decorator.py +0 -0
  113. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/model.py +0 -0
  114. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/rag_tool.py +0 -0
  115. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq/tool/tool_handler.py +0 -0
  116. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq.egg-info/SOURCES.txt +0 -0
  117. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq.egg-info/dependency_links.txt +0 -0
  118. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq.egg-info/requires.txt +0 -0
  119. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/src/versionhq.egg-info/top_level.txt +0 -0
  120. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/__init__.py +0 -0
  121. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/_sample/sample.csv +0 -0
  122. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/_sample/sample.json +0 -0
  123. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent/__init__.py +0 -0
  124. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent/agent_test.py +0 -0
  125. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent/doc_test.py +0 -0
  126. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent_network/Prompts/Demo_test.py +0 -0
  127. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent_network/__init__.py +0 -0
  128. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent_network/agent_network_test.py +0 -0
  129. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/agent_network/doc_test.py +0 -0
  130. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/cli/__init__.py +0 -0
  131. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/clients/customer_test.py +0 -0
  132. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/clients/product_test.py +0 -0
  133. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/clients/workflow_test.py +0 -0
  134. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/conftest.py +0 -0
  135. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/doc_test.py +0 -0
  136. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/formation_test.py +0 -0
  137. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/knowledge/__init__.py +0 -0
  138. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/knowledge/knowledge_test.py +0 -0
  139. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/knowledge/mock_report_compressed.pdf +0 -0
  140. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/llm/__init__.py +0 -0
  141. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/llm/llm_test.py +0 -0
  142. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/memory/__init__.py +0 -0
  143. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/memory/memory_test.py +0 -0
  144. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/__init__.py +0 -0
  145. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/doc_eval_test.py +0 -0
  146. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/doc_taskoutput_test.py +0 -0
  147. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/doc_test.py +0 -0
  148. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task/eval_test.py +0 -0
  149. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task_graph/__init__.py +0 -0
  150. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task_graph/doc_test.py +0 -0
  151. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/task_graph/task_graph_test.py +0 -0
  152. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/tool/__init__.py +0 -0
  153. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/tool/composio_test.py +0 -0
  154. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/tool/doc_test.py +0 -0
  155. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/tool/rag_tool_test.py +0 -0
  156. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/tool/tool_test.py +0 -0
  157. {versionhq-1.2.3.6 → versionhq-1.2.3.7}/tests/usecase_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.3.6
3
+ Version: 1.2.3.7
4
4
  Summary: An agentic orchestration framework for building agent networks that handle task automation.
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__", "*.egg-info"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.2.3.6"
18
+ version = "1.2.3.7"
19
19
  authors = [{ name = "Kuriko Iwai", email = "kuriko@versi0n.io" }]
20
20
  description = "An agentic orchestration framework for building agent networks that handle task automation."
21
21
  readme = "README.md"
@@ -32,7 +32,7 @@ from versionhq.agent_network.formation import form_agent_network
32
32
  from versionhq.task_graph.draft import workflow
33
33
 
34
34
 
35
- __version__ = "1.2.3.6"
35
+ __version__ = "1.2.3.7"
36
36
  __all__ = [
37
37
  "Agent",
38
38
 
@@ -7,13 +7,12 @@ from dotenv import load_dotenv
7
7
  from pydantic import UUID4, BaseModel, Field, InstanceOf, PrivateAttr, model_validator, field_validator
8
8
  from pydantic_core import PydanticCustomError
9
9
 
10
- from versionhq.llm.model import LLM, DEFAULT_CONTEXT_WINDOW_SIZE, DEFAULT_MODEL_NAME, PROVIDERS
10
+ from versionhq.agent.rpm_controller import RPMController
11
11
  from versionhq.tool.model import Tool, ToolSet, BaseTool
12
12
  from versionhq.knowledge.model import BaseKnowledgeSource, Knowledge
13
13
  from versionhq.memory.contextual_memory import ContextualMemory
14
14
  from versionhq.memory.model import ShortTermMemory, LongTermMemory, UserMemory
15
15
  from versionhq._utils.logger import Logger
16
- from versionhq.agent.rpm_controller import RPMController
17
16
  from versionhq._utils.process_config import process_config
18
17
 
19
18
 
@@ -68,8 +67,8 @@ class Agent(BaseModel):
68
67
  callbacks: Optional[List[Callable]] = Field(default_factory=list, description="callback functions to execute after any task execution")
69
68
 
70
69
  # llm settings cascaded to the LLM model
71
- llm: str | InstanceOf[LLM] | Dict[str, Any] = Field(default=None)
72
- func_calling_llm: str | InstanceOf[LLM] | Dict[str, Any] = Field(default=None)
70
+ llm: Any = Field(default=None, description="store LLM object")
71
+ func_calling_llm: Any = Field(default=None, description="store LLM object")
73
72
  respect_context_window: bool = Field(default=True, description="keep messages under the context window size")
74
73
  max_execution_time: Optional[int] = Field(default=None, description="max. task execution time in seconds")
75
74
  max_rpm: Optional[int] = Field(default=None, description="max. number of requests per minute")
@@ -78,7 +77,6 @@ class Agent(BaseModel):
78
77
  # # cache, error, ops handling
79
78
  # formatting_errors: int = Field(default=0, description="number of formatting errors.")
80
79
 
81
-
82
80
  @field_validator("id", mode="before")
83
81
  @classmethod
84
82
  def _deny_user_set_id(cls, v: Optional[UUID4]) -> None:
@@ -106,6 +104,8 @@ class Agent(BaseModel):
106
104
  """
107
105
  Set up `llm` and `func_calling_llm` as valid LLM objects using the given kwargs.
108
106
  """
107
+ from versionhq.llm.model import LLM, DEFAULT_MODEL_NAME
108
+
109
109
  self.llm = self._convert_to_llm_object(llm=self.llm)
110
110
 
111
111
  func_calling_llm = self.func_calling_llm if self.func_calling_llm else self.llm if self.llm else None
@@ -267,11 +267,13 @@ class Agent(BaseModel):
267
267
  return self
268
268
 
269
269
 
270
- def _convert_to_llm_object(self, llm: Any = None) -> LLM:
270
+ def _convert_to_llm_object(self, llm: Any = None): # returns LLM object
271
271
  """
272
272
  Convert the given value to LLM object.
273
273
  When `llm` is dict or self.llm_config is not None, add these values to the LLM object after validating them.
274
274
  """
275
+ from versionhq.llm.model import LLM, DEFAULT_MODEL_NAME
276
+
275
277
  llm = llm if llm else self.llm if self.llm else DEFAULT_MODEL_NAME
276
278
 
277
279
  if not llm:
@@ -279,11 +281,11 @@ class Agent(BaseModel):
279
281
 
280
282
  match llm:
281
283
  case LLM():
282
- return self._set_llm_params(llm=llm, config=self.llm_config)
284
+ return self._set_llm_params(llm_obj=llm, config=self.llm_config)
283
285
 
284
286
  case str():
285
287
  llm = LLM(model=llm)
286
- return self._set_llm_params(llm=llm, config=self.llm_config)
288
+ return self._set_llm_params(llm_obj=llm, config=self.llm_config)
287
289
 
288
290
  case dict():
289
291
  model_name = llm.pop("model_name", llm.pop("deployment_name", str(llm)))
@@ -301,13 +303,20 @@ class Agent(BaseModel):
301
303
  "base_url": getattr(llm, "base_url", None),
302
304
  }
303
305
  config = llm_params.update(self.llm_config) if self.llm_config else llm_params
304
- return self._set_llm_params(llm=llm, config=config)
306
+ return self._set_llm_params(llm_obj=llm, config=config)
305
307
 
306
308
 
307
- def _set_llm_params(self, llm: LLM, config: Dict[str, Any] = None) -> LLM:
309
+ def _set_llm_params(self, llm_obj, config: Dict[str, Any] = None): # returns LLM object
308
310
  """
309
311
  Add valid params to the LLM object.
310
312
  """
313
+ from versionhq.llm.model import LLM, DEFAULT_CONTEXT_WINDOW_SIZE
314
+ from versionhq.llm.llm_vars import PROVIDERS
315
+
316
+ llm = llm_obj if isinstance(llm_obj, LLM) else None
317
+
318
+ if not llm: return
319
+
311
320
  if llm.provider is None:
312
321
  provider_name = llm.model.split("/")[0]
313
322
  valid_provider = provider_name if provider_name in PROVIDERS else None
@@ -352,6 +361,8 @@ class Agent(BaseModel):
352
361
  """
353
362
  Fine-tuned the base model using OpenAI train framework.
354
363
  """
364
+ from versionhq.llm.model import LLM
365
+
355
366
  if not isinstance(self.llm, LLM):
356
367
  pass
357
368
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.3.6
3
+ Version: 1.2.3.7
4
4
  Summary: An agentic orchestration framework for building agent networks that handle task automation.
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -1,7 +1,8 @@
1
1
  import pytest
2
2
  from typing import Any, Callable
3
3
 
4
- from versionhq.agent.model import Agent, LLM
4
+ from versionhq.agent.model import Agent
5
+ from versionhq.llm.model import LLM
5
6
  from versionhq.task.model import Task
6
7
  from versionhq.tool.model import Tool
7
8
 
@@ -1,7 +1,8 @@
1
1
  from unittest.mock import patch
2
2
  from typing import Callable
3
3
 
4
- from versionhq.agent.model import Agent, LLM
4
+ from versionhq.agent.model import Agent
5
+ from versionhq.llm.model import LLM
5
6
  from versionhq.task.model import Task, ResponseField, TaskOutput
6
7
  from versionhq.tool.model import Tool, ToolSet
7
8
  from versionhq.tool.decorator import tool
@@ -2515,7 +2515,7 @@ name = "nvidia-cudnn-cu12"
2515
2515
  version = "9.1.0.70"
2516
2516
  source = { registry = "https://pypi.org/simple" }
2517
2517
  dependencies = [
2518
- { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2518
+ { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2519
2519
  ]
2520
2520
  wheels = [
2521
2521
  { url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741 },
@@ -2526,7 +2526,7 @@ name = "nvidia-cufft-cu12"
2526
2526
  version = "11.2.1.3"
2527
2527
  source = { registry = "https://pypi.org/simple" }
2528
2528
  dependencies = [
2529
- { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2529
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2530
2530
  ]
2531
2531
  wheels = [
2532
2532
  { url = "https://files.pythonhosted.org/packages/27/94/3266821f65b92b3138631e9c8e7fe1fb513804ac934485a8d05776e1dd43/nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f083fc24912aa410be21fa16d157fed2055dab1cc4b6934a0e03cba69eb242b9", size = 211459117 },
@@ -2545,9 +2545,9 @@ name = "nvidia-cusolver-cu12"
2545
2545
  version = "11.6.1.9"
2546
2546
  source = { registry = "https://pypi.org/simple" }
2547
2547
  dependencies = [
2548
- { name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2549
- { name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2550
- { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2548
+ { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2549
+ { name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2550
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2551
2551
  ]
2552
2552
  wheels = [
2553
2553
  { url = "https://files.pythonhosted.org/packages/3a/e1/5b9089a4b2a4790dfdea8b3a006052cfecff58139d5a4e34cb1a51df8d6f/nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_x86_64.whl", hash = "sha256:19e33fa442bcfd085b3086c4ebf7e8debc07cfe01e11513cc6d332fd918ac260", size = 127936057 },
@@ -2558,7 +2558,7 @@ name = "nvidia-cusparse-cu12"
2558
2558
  version = "12.3.1.170"
2559
2559
  source = { registry = "https://pypi.org/simple" }
2560
2560
  dependencies = [
2561
- { name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or sys_platform == 'win32'" },
2561
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2562
2562
  ]
2563
2563
  wheels = [
2564
2564
  { url = "https://files.pythonhosted.org/packages/db/f7/97a9ea26ed4bbbfc2d470994b8b4f338ef663be97b8f677519ac195e113d/nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ea4f11a2904e2a8dc4b1833cc1b5181cde564edd0d5cd33e3c168eff2d1863f1", size = 207454763 },
@@ -4791,7 +4791,7 @@ wheels = [
4791
4791
 
4792
4792
  [[package]]
4793
4793
  name = "versionhq"
4794
- version = "1.2.3.6"
4794
+ version = "1.2.3.7"
4795
4795
  source = { editable = "." }
4796
4796
  dependencies = [
4797
4797
  { name = "appdirs" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes