lionagi 0.0.206__tar.gz → 0.0.208__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. {lionagi-0.0.206 → lionagi-0.0.208}/PKG-INFO +1 -1
  2. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/ollama.py +2 -2
  3. lionagi-0.0.208/lionagi/core/branch/branch.py +841 -0
  4. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/branch/branch_manager.py +0 -1
  5. lionagi-0.0.208/lionagi/core/branch/conversation.py +787 -0
  6. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/sessions/session.py +137 -64
  7. lionagi-0.0.208/lionagi/tests/test_utils/__init__.py +0 -0
  8. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tools/tool_manager.py +39 -62
  9. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/__init__.py +3 -2
  10. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/call_util.py +9 -7
  11. lionagi-0.0.208/lionagi/utils/sys_util.py +448 -0
  12. lionagi-0.0.208/lionagi/version.py +1 -0
  13. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi.egg-info/PKG-INFO +1 -1
  14. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi.egg-info/SOURCES.txt +0 -1
  15. lionagi-0.0.206/lionagi/core/branch/branch.py +0 -589
  16. lionagi-0.0.206/lionagi/core/branch/conversation.py +0 -484
  17. lionagi-0.0.206/lionagi/core/core_util.py +0 -59
  18. lionagi-0.0.206/lionagi/utils/pd_util.py +0 -57
  19. lionagi-0.0.206/lionagi/utils/sys_util.py +0 -416
  20. lionagi-0.0.206/lionagi/version.py +0 -1
  21. {lionagi-0.0.206 → lionagi-0.0.208}/LICENSE +0 -0
  22. {lionagi-0.0.206 → lionagi-0.0.208}/README.md +0 -0
  23. {lionagi-0.0.206 → lionagi-0.0.208}/README.rst +0 -0
  24. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/__init__.py +0 -0
  25. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/__init__.py +0 -0
  26. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/anthropic.py +0 -0
  27. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/anyscale.py +0 -0
  28. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/azure.py +0 -0
  29. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/base_service.py +0 -0
  30. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/bedrock.py +0 -0
  31. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/everlyai.py +0 -0
  32. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/gemini.py +0 -0
  33. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/gpt4all.py +0 -0
  34. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/huggingface.py +0 -0
  35. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/litellm.py +0 -0
  36. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/localai.py +0 -0
  37. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/mistralai.py +0 -0
  38. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/mlx_service.py +0 -0
  39. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/oai.py +0 -0
  40. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/openllm.py +0 -0
  41. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/openrouter.py +0 -0
  42. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/perplexity.py +0 -0
  43. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/predibase.py +0 -0
  44. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/rungpt.py +0 -0
  45. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/services.py +0 -0
  46. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/transformers.py +0 -0
  47. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/vllm.py +0 -0
  48. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/_services/xinference.py +0 -0
  49. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/__init__.py +0 -0
  50. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/planner.py +0 -0
  51. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/prompter.py +0 -0
  52. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/scorer.py +0 -0
  53. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/summarizer.py +0 -0
  54. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/agents/validator.py +0 -0
  55. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/bridge/__init__.py +0 -0
  56. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/bridge/langchain.py +0 -0
  57. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/bridge/llama_index.py +0 -0
  58. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/configs/__init__.py +0 -0
  59. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/configs/oai_configs.py +0 -0
  60. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/configs/openrouter_configs.py +0 -0
  61. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/__init__.py +0 -0
  62. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/branch/__init__.py +0 -0
  63. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/branch/cluster.py +0 -0
  64. /lionagi-0.0.206/lionagi/core/flow/__init__.py → /lionagi-0.0.208/lionagi/core/core_util.py +0 -0
  65. {lionagi-0.0.206/lionagi/core/instruction_set → lionagi-0.0.208/lionagi/core/flow}/__init__.py +0 -0
  66. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/flow/flow.py +0 -0
  67. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/flow/flow_util.py +0 -0
  68. {lionagi-0.0.206/lionagi/core/messages → lionagi-0.0.208/lionagi/core/instruction_set}/__init__.py +0 -0
  69. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/instruction_set/instruction_set.py +0 -0
  70. {lionagi-0.0.206/lionagi/core/sessions → lionagi-0.0.208/lionagi/core/messages}/__init__.py +0 -0
  71. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/core/messages/messages.py +0 -0
  72. {lionagi-0.0.206/lionagi/models → lionagi-0.0.208/lionagi/core/sessions}/__init__.py +0 -0
  73. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/__init__.py +0 -0
  74. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/chroma.py +0 -0
  75. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/deeplake.py +0 -0
  76. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/elasticsearch.py +0 -0
  77. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/lantern.py +0 -0
  78. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/pinecone.py +0 -0
  79. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/postgres.py +0 -0
  80. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/datastores/qdrant.py +0 -0
  81. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/loaders/__init__.py +0 -0
  82. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/loaders/chunker.py +0 -0
  83. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/loaders/load_util.py +0 -0
  84. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/loaders/reader.py +0 -0
  85. {lionagi-0.0.206/lionagi/tests → lionagi-0.0.208/lionagi/models}/__init__.py +0 -0
  86. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/models/base_model.py +0 -0
  87. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/models/imodel.py +0 -0
  88. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/__init__.py +0 -0
  89. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/async_queue.py +0 -0
  90. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/base_condition.py +0 -0
  91. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/base_node.py +0 -0
  92. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/base_tool.py +0 -0
  93. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/data_logger.py +0 -0
  94. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/data_node.py +0 -0
  95. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/schema/status_tracker.py +0 -0
  96. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/structures/__init__.py +0 -0
  97. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/structures/graph.py +0 -0
  98. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/structures/relationship.py +0 -0
  99. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/structures/structure.py +0 -0
  100. {lionagi-0.0.206/lionagi/tests/test_utils → lionagi-0.0.208/lionagi/tests}/__init__.py +0 -0
  101. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_api_util.py +0 -0
  102. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_call_util.py +0 -0
  103. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_encrypt_util.py +0 -0
  104. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_io_util.py +0 -0
  105. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_nested_util.py +0 -0
  106. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tests/test_utils/test_sys_util.py +0 -0
  107. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tools/__init__.py +0 -0
  108. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/tools/tool_util.py +0 -0
  109. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/api_util.py +0 -0
  110. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/encrypt_util.py +0 -0
  111. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/io_util.py +0 -0
  112. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/nested_util.py +0 -0
  113. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi/utils/url_util.py +0 -0
  114. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi.egg-info/dependency_links.txt +0 -0
  115. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi.egg-info/requires.txt +0 -0
  116. {lionagi-0.0.206 → lionagi-0.0.208}/lionagi.egg-info/top_level.txt +0 -0
  117. {lionagi-0.0.206 → lionagi-0.0.208}/pyproject.toml +0 -0
  118. {lionagi-0.0.206 → lionagi-0.0.208}/setup.cfg +0 -0
  119. {lionagi-0.0.206 → lionagi-0.0.208}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lionagi
3
- Version: 0.0.206
3
+ Version: 0.0.208
4
4
  Summary: Towards automated general intelligence.
5
5
  Author: HaiyangLi
6
6
  Author-email: Haiyang Li <ocean@lionagi.ai>
@@ -17,14 +17,14 @@ class OllamaService(BaseService):
17
17
  raise ImportError(f'Unable to import required module from ollama. Please make sure that ollama is installed.')
18
18
 
19
19
  self.model = model
20
- self.client = self.ollama.Client(**kwargs)
20
+ self.client = self.ollama.AsyncClient(**kwargs)
21
21
 
22
22
  async def serve_chat(self, messages, **kwargs):
23
23
  self.ollama.pull(self.model)
24
24
  payload = {'messages': messages}
25
25
 
26
26
  try:
27
- completion = self.client.chat(model=self.model, messages=messages, **kwargs)
27
+ completion = await self.client.chat(model=self.model, messages=messages, **kwargs)
28
28
  completion['choices'] = [{'message': completion.pop('message')}]
29
29
  return payload, completion
30
30
  except Exception as e: