langroid 0.1.184__tar.gz → 0.1.186__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 (121) hide show
  1. {langroid-0.1.184 → langroid-0.1.186}/PKG-INFO +3 -2
  2. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/base.py +1 -0
  3. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/callbacks/chainlit.py +53 -9
  4. langroid-0.1.186/langroid/agent/tools/duckduckgo_search_tool.py +66 -0
  5. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/utils.py +0 -8
  6. {langroid-0.1.184 → langroid-0.1.186}/pyproject.toml +4 -3
  7. {langroid-0.1.184 → langroid-0.1.186}/LICENSE +0 -0
  8. {langroid-0.1.184 → langroid-0.1.186}/README.md +0 -0
  9. {langroid-0.1.184 → langroid-0.1.186}/langroid/__init__.py +0 -0
  10. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/__init__.py +0 -0
  11. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/batch.py +0 -0
  12. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/callbacks/__init__.py +0 -0
  13. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/chat_agent.py +0 -0
  14. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/chat_document.py +0 -0
  15. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/helpers.py +0 -0
  16. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/junk +0 -0
  17. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/openai_assistant.py +0 -0
  18. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/__init__.py +0 -0
  19. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/doc_chat_agent.py +0 -0
  20. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
  21. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_rag/__init__.py +0 -0
  22. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
  23. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
  24. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_rag/lance_tools.py +0 -0
  25. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
  26. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/neo4j/__init__.py +0 -0
  27. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
  28. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
  29. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/neo4j/utils/__init__.py +0 -0
  30. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/neo4j/utils/system_message.py +0 -0
  31. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/relevance_extractor_agent.py +0 -0
  32. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/retriever_agent.py +0 -0
  33. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/__init__.py +0 -0
  34. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
  35. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/utils/__init__.py +0 -0
  36. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
  37. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
  38. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/utils/system_message.py +0 -0
  39. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/sql/utils/tools.py +0 -0
  40. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/special/table_chat_agent.py +0 -0
  41. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/task.py +0 -0
  42. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tool_message.py +0 -0
  43. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/__init__.py +0 -0
  44. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/extract_tool.py +0 -0
  45. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/generator_tool.py +0 -0
  46. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/google_search_tool.py +0 -0
  47. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/metaphor_search_tool.py +0 -0
  48. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/recipient_tool.py +0 -0
  49. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/run_python_code.py +0 -0
  50. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/sciphi_search_rag_tool.py +0 -0
  51. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent/tools/segment_extract_tool.py +0 -0
  52. {langroid-0.1.184 → langroid-0.1.186}/langroid/agent_config.py +0 -0
  53. {langroid-0.1.184 → langroid-0.1.186}/langroid/cachedb/__init__.py +0 -0
  54. {langroid-0.1.184 → langroid-0.1.186}/langroid/cachedb/base.py +0 -0
  55. {langroid-0.1.184 → langroid-0.1.186}/langroid/cachedb/momento_cachedb.py +0 -0
  56. {langroid-0.1.184 → langroid-0.1.186}/langroid/cachedb/redis_cachedb.py +0 -0
  57. {langroid-0.1.184 → langroid-0.1.186}/langroid/embedding_models/__init__.py +0 -0
  58. {langroid-0.1.184 → langroid-0.1.186}/langroid/embedding_models/base.py +0 -0
  59. {langroid-0.1.184 → langroid-0.1.186}/langroid/embedding_models/clustering.py +0 -0
  60. {langroid-0.1.184 → langroid-0.1.186}/langroid/embedding_models/models.py +0 -0
  61. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/__init__.py +0 -0
  62. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/azure_openai.py +0 -0
  63. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/base.py +0 -0
  64. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/config.py +0 -0
  65. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/openai_assistants.py +0 -0
  66. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/openai_gpt.py +0 -0
  67. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/prompt_formatter/__init__.py +0 -0
  68. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/prompt_formatter/base.py +0 -0
  69. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
  70. {langroid-0.1.184 → langroid-0.1.186}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
  71. {langroid-0.1.184 → langroid-0.1.186}/langroid/mytypes.py +0 -0
  72. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/__init__.py +0 -0
  73. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/agent_chats.py +0 -0
  74. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/code-parsing.md +0 -0
  75. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/code_parser.py +0 -0
  76. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/config.py +0 -0
  77. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/document_parser.py +0 -0
  78. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/json.py +0 -0
  79. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/para_sentence_split.py +0 -0
  80. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/parser.py +0 -0
  81. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/repo_loader.py +0 -0
  82. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/search.py +0 -0
  83. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/spider.py +0 -0
  84. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/table_loader.py +0 -0
  85. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/url_loader.py +0 -0
  86. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/url_loader_cookies.py +0 -0
  87. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/urls.py +0 -0
  88. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/utils.py +0 -0
  89. {langroid-0.1.184 → langroid-0.1.186}/langroid/parsing/web_search.py +0 -0
  90. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/__init__.py +0 -0
  91. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/chat-gpt4-system-prompt.md +0 -0
  92. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/dialog.py +0 -0
  93. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/prompts_config.py +0 -0
  94. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/templates.py +0 -0
  95. {langroid-0.1.184 → langroid-0.1.186}/langroid/prompts/transforms.py +0 -0
  96. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/__init__.py +0 -0
  97. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/algorithms/__init__.py +0 -0
  98. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/algorithms/graph.py +0 -0
  99. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/configuration.py +0 -0
  100. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/constants.py +0 -0
  101. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/docker.py +0 -0
  102. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/globals.py +0 -0
  103. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/llms/__init__.py +0 -0
  104. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/llms/strings.py +0 -0
  105. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/logging.py +0 -0
  106. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/output/__init__.py +0 -0
  107. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/output/printing.py +0 -0
  108. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/pandas_utils.py +0 -0
  109. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/pydantic_utils.py +0 -0
  110. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/system.py +0 -0
  111. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/web/__init__.py +0 -0
  112. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/web/login.py +0 -0
  113. {langroid-0.1.184 → langroid-0.1.186}/langroid/utils/web/selenium_login.py +0 -0
  114. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/__init__.py +0 -0
  115. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/base.py +0 -0
  116. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/chromadb.py +0 -0
  117. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/lancedb.py +0 -0
  118. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/meilisearch.py +0 -0
  119. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/momento.py +0 -0
  120. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/qdrant_cloud.py +0 -0
  121. {langroid-0.1.184 → langroid-0.1.186}/langroid/vector_store/qdrantdb.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.1.184
3
+ Version: 0.1.186
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -37,7 +37,7 @@ Requires-Dist: google-api-python-client (>=2.95.0,<3.0.0)
37
37
  Requires-Dist: halo (>=0.0.31,<0.0.32)
38
38
  Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
39
39
  Requires-Dist: lancedb (>=0.4.1,<0.5.0)
40
- Requires-Dist: litellm (>=1.22.3,<2.0.0) ; extra == "litellm"
40
+ Requires-Dist: litellm (>=1.22.5,<2.0.0) ; extra == "litellm"
41
41
  Requires-Dist: lxml (>=4.9.3,<5.0.0)
42
42
  Requires-Dist: meilisearch (>=0.28.3,<0.29.0)
43
43
  Requires-Dist: meilisearch-python-sdk (>=2.2.3,<3.0.0)
@@ -75,6 +75,7 @@ Requires-Dist: pytest-postgresql (>=5.0.0,<6.0.0) ; extra == "postgres"
75
75
  Requires-Dist: pytest-redis (>=3.0.2,<4.0.0)
76
76
  Requires-Dist: python-docx (>=1.1.0,<2.0.0)
77
77
  Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
78
+ Requires-Dist: python-socketio (>=5.11.0,<6.0.0) ; extra == "chainlit"
78
79
  Requires-Dist: qdrant-client (>=1.7.0,<2.0.0)
79
80
  Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0)
80
81
  Requires-Dist: redis (>=5.0.1,<6.0.0)
@@ -105,6 +105,7 @@ class Agent(ABC):
105
105
  get_user_response=None,
106
106
  get_last_step=noop_fn,
107
107
  set_parent_agent=noop_fn,
108
+ show_error_message=noop_fn,
108
109
  )
109
110
 
110
111
  def entity_responders(
@@ -54,7 +54,7 @@ async def setup_llm() -> None:
54
54
  context_length = llm_settings.get("context_length", 16_000)
55
55
  temperature = llm_settings.get("temperature", 0.2)
56
56
  timeout = llm_settings.get("timeout", 90)
57
- print(f"Using model: {model}")
57
+ logger.info(f"Using model: {model}")
58
58
  llm_config = lm.OpenAIGPTConfig(
59
59
  chat_model=model or lm.OpenAIChatModel.GPT4_TURBO,
60
60
  # or, other possibilities for example:
@@ -271,7 +271,10 @@ class ChainlitAgentCallbacks:
271
271
  stream: Optional[cl.Step] = None # pushed into openai_gpt.py to stream tokens
272
272
  parent_agent: Optional[lr.Agent] = None # used to get parent id, for step nesting
273
273
 
274
- def __init__(self, agent: lr.Agent):
274
+ def __init__(self, agent: lr.Agent, msg: cl.Message = None):
275
+ """Add callbacks to the agent, and save the initial message,
276
+ so we can alter the display of the first user message.
277
+ """
275
278
  agent.callbacks.start_llm_stream = self.start_llm_stream
276
279
  agent.callbacks.cancel_llm_stream = self.cancel_llm_stream
277
280
  agent.callbacks.finish_llm_stream = self.finish_llm_stream
@@ -280,8 +283,11 @@ class ChainlitAgentCallbacks:
280
283
  agent.callbacks.get_user_response = self.get_user_response
281
284
  agent.callbacks.get_last_step = self.get_last_step
282
285
  agent.callbacks.set_parent_agent = self.set_parent_agent
286
+ agent.callbacks.show_error_message = self.show_error_message
283
287
  self.agent: lr.Agent = agent
284
288
  self.name = agent.config.name
289
+ if msg is not None:
290
+ self.show_first_user_message(msg)
285
291
 
286
292
  def _get_parent_id(self) -> str | None:
287
293
  """Get step id under which we need to nest the current step:
@@ -310,6 +316,7 @@ class ChainlitAgentCallbacks:
310
316
 
311
317
  def start_llm_stream(self) -> Callable[[str], None]:
312
318
  """Returns a streaming fn that can be passed to the LLM class"""
319
+ model = self.agent.llm.config.chat_model
313
320
  logger.info(
314
321
  f"""
315
322
  Starting LLM stream for {self.agent.config.name}
@@ -317,7 +324,7 @@ class ChainlitAgentCallbacks:
317
324
  """
318
325
  )
319
326
  self.stream = cl.Step(
320
- name=self.agent.config.name + "(LLM 🧠)",
327
+ name=self.agent.config.name + f"(LLM {model} 🧠)",
321
328
  type="llm",
322
329
  parent_id=self._get_parent_id(),
323
330
  )
@@ -372,6 +379,18 @@ class ChainlitAgentCallbacks:
372
379
  step.output = content or NO_ANSWER
373
380
  run_sync(step.send()) # type: ignore
374
381
 
382
+ def show_error_message(self, error: str) -> None:
383
+ """Show error message as a step."""
384
+ step = cl.Step(
385
+ name=self.agent.config.name + "(Error 🚫)",
386
+ type="run",
387
+ parent_id=self._get_parent_id(),
388
+ language="text",
389
+ )
390
+ self.last_step = step
391
+ step.output = error
392
+ run_sync(step.send())
393
+
375
394
  def show_agent_response(self, content: str) -> None:
376
395
  """Show message from agent (typically tool handler).
377
396
  Agent response can be considered as a "step"
@@ -430,19 +449,44 @@ class ChainlitAgentCallbacks:
430
449
  )
431
450
  )
432
451
 
452
+ def show_user_response(self, message: str) -> None:
453
+ """Show user response as a step."""
454
+ step = cl.Step(
455
+ id=cl.context.current_step.id,
456
+ name=self.agent.config.name + "(You 😃)",
457
+ type="run",
458
+ parent_id=self._get_parent_id(),
459
+ )
460
+ step.output = message
461
+ run_sync(step.send())
462
+
463
+ def show_first_user_message(self, msg: cl.Message):
464
+ """Show first user message as a step."""
465
+ step = cl.Step(
466
+ id=msg.id,
467
+ name=self.agent.config.name + "(You 😃)",
468
+ type="run",
469
+ parent_id=self._get_parent_id(),
470
+ )
471
+ self.last_step = step
472
+ step.output = msg.content
473
+ run_sync(step.update())
474
+
433
475
 
434
476
  class ChainlitTaskCallbacks:
435
477
  """
436
- Inject ChainlitCallbacks into a Langroid Task's agent and
478
+ Recursively inject ChainlitAgentCallbacks into a Langroid Task's agent and
437
479
  agents of sub-tasks.
438
480
  """
439
481
 
440
- def __init__(self, task: lr.Task):
441
- ChainlitTaskCallbacks._inject_callbacks(task)
482
+ def __init__(self, task: lr.Task, msg: cl.Message = None):
483
+ """Inject callbacks recursively, ensuring msg is passed to the
484
+ top-level agent"""
485
+ ChainlitTaskCallbacks._inject_callbacks(task, msg)
442
486
 
443
487
  @staticmethod
444
- def _inject_callbacks(task: lr.Task) -> None:
445
- # recursively apply ChainlitCallbacks to agents of sub-tasks
446
- ChainlitAgentCallbacks(task.agent)
488
+ def _inject_callbacks(task: lr.Task, msg: cl.Message = None) -> None:
489
+ # recursively apply ChainlitAgentCallbacks to agents of sub-tasks
490
+ ChainlitAgentCallbacks(task.agent, msg)
447
491
  for t in task.sub_tasks:
448
492
  ChainlitTaskCallbacks._inject_callbacks(t)
@@ -0,0 +1,66 @@
1
+ """
2
+ A tool to trigger a Metaphor search for a given query,
3
+ (https://docs.exa.ai/reference/getting-started)
4
+ and return the top results with their titles, links, summaries.
5
+ Since the tool is stateless (i.e. does not need
6
+ access to agent state), it can be enabled for any agent, without having to define a
7
+ special method inside the agent: `agent.enable_message(MetaphorSearchTool)`
8
+
9
+ NOTE: To use this tool, you need to:
10
+
11
+ * set the METAPHOR_API_KEY environment variables in
12
+ your `.env` file, e.g. `METAPHOR_API_KEY=your_api_key_here`
13
+ (Note as of 28 Jan 2023, Metaphor renamed to Exa, so you can also use
14
+ `EXA_API_KEY=your_api_key_here`)
15
+
16
+ * install langroid with the `metaphor` extra, e.g.
17
+ `pip install langroid[metaphor]` or `poetry add langroid[metaphor]`
18
+ (it installs the `metaphor-python` package from pypi).
19
+
20
+ For more information, please refer to the official docs:
21
+ https://metaphor.systems/
22
+ """
23
+ from typing import List
24
+
25
+ from langroid.agent.tool_message import ToolMessage
26
+ from langroid.parsing.web_search import metaphor_search
27
+
28
+
29
+ class DuckduckgoSearchTool(ToolMessage):
30
+ request: str = "duckduckgo_search"
31
+ purpose: str = """
32
+ To search the web and return up to <num_results>
33
+ links relevant to the given <query>. When using this tool,
34
+ ONLY show the required JSON, DO NOT SAY ANYTHING ELSE.
35
+ Wait for the results of the web search, and then use them to
36
+ compose your response.
37
+ """
38
+ query: str
39
+ num_results: int
40
+
41
+ def handle(self) -> str:
42
+ """
43
+ Conducts a search using the metaphor API based on the provided query
44
+ and number of results by triggering a metaphor_search.
45
+
46
+ Returns:
47
+ str: A formatted string containing the titles, links, and
48
+ summaries of each search result, separated by two newlines.
49
+ """
50
+
51
+ search_results = metaphor_search(self.query, self.num_results)
52
+ # return Title, Link, Summary of each result, separated by two newlines
53
+ results_str = "\n\n".join(str(result) for result in search_results)
54
+ return f"""
55
+ BELOW ARE THE RESULTS FROM THE WEB SEARCH. USE THESE TO COMPOSE YOUR RESPONSE:
56
+ {results_str}
57
+ """
58
+
59
+ @classmethod
60
+ def examples(cls) -> List["ToolMessage"]:
61
+ return [
62
+ cls(
63
+ query="When was the Llama2 Large Language Model (LLM) released?",
64
+ num_results=3,
65
+ ),
66
+ ]
@@ -134,11 +134,3 @@ def async_retry_with_exponential_backoff(
134
134
  raise e
135
135
 
136
136
  return wrapper
137
-
138
-
139
- # @retry_with_exponential_backoff
140
- # def completions_with_backoff(**kwargs):
141
- # return openai.Completion.create(**kwargs)
142
-
143
-
144
- # completions_with_backoff(model="text-davinci-002", prompt="Once upon a time,")
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langroid"
3
- version = "0.1.184"
3
+ version = "0.1.186"
4
4
  description = "Harness LLMs with Multi-Agent Programming"
5
5
  authors = ["Prasad Chalasani <pchalasani@gmail.com>"]
6
6
  readme = "README.md"
@@ -75,7 +75,7 @@ docstring-parser = "^0.15"
75
75
  farm-haystack = {extras = ["ocr", "preprocessing", "file-conversion", "pdf"], version = "^1.21.1"}
76
76
  meilisearch = "^0.28.3"
77
77
  meilisearch-python-sdk = "^2.2.3"
78
- litellm = {version = "^1.22.3", optional = true}
78
+ litellm = {version = "^1.22.5", optional = true}
79
79
  scrapy = "^2.11.0"
80
80
  async-generator = "^1.10"
81
81
  lancedb = "^0.4.1"
@@ -86,6 +86,7 @@ python-docx = "^1.1.0"
86
86
  aiohttp = "^3.9.1"
87
87
  metaphor-python = {version = "^0.1.23", optional = true}
88
88
  chainlit = {version = "^1.0.200", optional = true}
89
+ python-socketio = {version="^5.11.0", optional=true}
89
90
 
90
91
  [tool.poetry.extras]
91
92
  # install these using `poetry install -E [...]` where [...] is one of the extras below
@@ -97,7 +98,7 @@ litellm = ["litellm"]
97
98
  neo4j = ["neo4j"]
98
99
  sciphi = ["agent-search"]
99
100
  metaphor = ["metaphor-python"]
100
- chainlit = ["chainlit"]
101
+ chainlit = ["chainlit", "python-socketio"]
101
102
 
102
103
  [tool.poetry.group.dev.dependencies]
103
104
  pytest = "^7.3.1"
File without changes
File without changes