langroid 0.1.244__py3-none-any.whl → 0.1.245__py3-none-any.whl

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.
@@ -166,6 +166,16 @@ class ChatDocument(Document):
166
166
  message = message.strip()
167
167
  if message in ["''", '""']:
168
168
  message = ""
169
+ if response.function_call is not None:
170
+ # Sometimes an OpenAI LLM may generate a function-call
171
+ # where the `name` is set, as well as `arugments.request` is set.
172
+ # In this case we override the `name` with the `request` value.
173
+ fc = response.function_call
174
+ if fc.arguments is not None:
175
+ request = fc.arguments.get("request")
176
+ if request is not None and request != "":
177
+ fc.name = request
178
+ fc.arguments.pop("request")
169
179
  return ChatDocument(
170
180
  content=message,
171
181
  function_call=response.function_call,
@@ -66,6 +66,10 @@ class QueryPlanCriticConfig(LanceQueryPlanAgentConfig):
66
66
  Here is how you must examine the QUERY PLAN + ANSWER:
67
67
  - ALL filtering conditions in the original query must be EXPLICITLY
68
68
  mentioned in the FILTER, and the QUERY field should not be used for filtering.
69
+ - If the ANSWER contains an ERROR message, then this means that the query
70
+ plan execution FAILED, and your feedback should say INVALID along
71
+ with the ERROR message, `suggested_fix` that aims to help the assistant
72
+ fix the problem (or simply equals "address the the error shown in feedback")
69
73
  - If the ANSWER is in the expected form, then the QUERY PLAN is likely VALID,
70
74
  and your feedback should say VALID, with empty `suggested_fix`.
71
75
  - If the ANSWER is {NO_ANSWER} or of the wrong form,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langroid
3
- Version: 0.1.244
3
+ Version: 0.1.245
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  License: MIT
6
6
  Author: Prasad Chalasani
@@ -5,7 +5,7 @@ langroid/agent/batch.py,sha256=feRA_yRG768ElOQjrKEefcRv6Aefd_yY7qktuYUQDwc,10040
5
5
  langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  langroid/agent/callbacks/chainlit.py,sha256=aYuJ8M4VDHr5oymoXL2bpThM7p6P9L45fgJf3MLdkWo,20997
7
7
  langroid/agent/chat_agent.py,sha256=X5uVMm9qdw3j-FRf4hbN8k8ByaSdtQCTuU8olKE0sbs,38750
8
- langroid/agent/chat_document.py,sha256=NGr5FEWasPUQZ7cJnqrkVYYTi5fOqplSoCU-z5tTONA,8422
8
+ langroid/agent/chat_document.py,sha256=qUadrl2hiahWnvLemWCCsaCesBrfwQtOIiz2IOhUCbM,8969
9
9
  langroid/agent/helpers.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  langroid/agent/junk,sha256=LxfuuW7Cijsg0szAzT81OjWWv1PMNI-6w_-DspVIO2s,339
11
11
  langroid/agent/openai_assistant.py,sha256=kIVDI4r-xGvplLU5s0nShPVHs6Jq-wOsfWE0kcMhAdQ,33056
@@ -13,7 +13,7 @@ langroid/agent/special/__init__.py,sha256=NG0JkB5y4K0bgnd9Q9UIvFExun3uTfVOWEVLVy
13
13
  langroid/agent/special/doc_chat_agent.py,sha256=LwWNb_1s5n9rOk9OpOFPuuY1VnVX5DjzQmPwBanKRrM,53763
14
14
  langroid/agent/special/lance_doc_chat_agent.py,sha256=USp0U3eTaJzwF_3bdqE7CedSLbaqAi2tm-VzygcyLaA,10175
15
15
  langroid/agent/special/lance_rag/__init__.py,sha256=QTbs0IVE2ZgDg8JJy1zN97rUUg4uEPH7SLGctFNumk4,174
16
- langroid/agent/special/lance_rag/critic_agent.py,sha256=qSWHyyQiFveiaIqtj98MZnAgVGSos4JtPgyfhn_sMxQ,6263
16
+ langroid/agent/special/lance_rag/critic_agent.py,sha256=Xe5pCqZAnVoM-dC9_8FW5U7s2dFkPPYZ4O41BDOyHT4,6576
17
17
  langroid/agent/special/lance_rag/lance_rag_task.py,sha256=l_HQgrYY-CX2FwIsS961aEF3bYog3GDYo98fj0C0mSk,2889
18
18
  langroid/agent/special/lance_rag/query_planner_agent.py,sha256=EdkCwwx4FpM9yGlk79dd8pQx3XozUT39ss77fhDo_cU,9214
19
19
  langroid/agent/special/lance_tools.py,sha256=btMwKdcT8RdwAjmzbtN1xxm3s1H7ipO9GSpUamryYx8,1456
@@ -121,7 +121,7 @@ langroid/vector_store/meilisearch.py,sha256=d2huA9P-NoYRuAQ9ZeXJmMKr7ry8u90RUSR2
121
121
  langroid/vector_store/momento.py,sha256=9cui31TTrILid2KIzUpBkN2Ey3g_CZWOQVdaFsA4Ors,10045
122
122
  langroid/vector_store/qdrant_cloud.py,sha256=3im4Mip0QXLkR6wiqVsjV1QvhSElfxdFSuDKddBDQ-4,188
123
123
  langroid/vector_store/qdrantdb.py,sha256=sk5Qb2ZNbooi0rorsMuqIMokF7WADw6PJ0D6goM2XBw,16802
124
- langroid-0.1.244.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
125
- langroid-0.1.244.dist-info/METADATA,sha256=L92RXaaEOJRfUhr7naozPonXwcGkb7vq5UZo4ChhJFk,49163
126
- langroid-0.1.244.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
127
- langroid-0.1.244.dist-info/RECORD,,
124
+ langroid-0.1.245.dist-info/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
125
+ langroid-0.1.245.dist-info/METADATA,sha256=Ucs49kPOL14MeUc2eKubI-mdxY0dfBaQlEPGKnoAy4U,49163
126
+ langroid-0.1.245.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
127
+ langroid-0.1.245.dist-info/RECORD,,