auto-coder 0.1.185__py3-none-any.whl → 0.1.188__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.

Potentially problematic release.


This version of auto-coder might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.185
3
+ Version: 0.1.188
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
26
26
  Requires-Dist: jupyter-client
27
27
  Requires-Dist: prompt-toolkit
28
28
  Requires-Dist: tokenizers
29
- Requires-Dist: byzerllm[saas] >=0.1.137
29
+ Requires-Dist: byzerllm[saas] >=0.1.138
30
30
  Requires-Dist: patch
31
31
  Requires-Dist: diff-match-patch
32
32
  Requires-Dist: GitPython
@@ -1,13 +1,13 @@
1
1
  autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  autocoder/auto_coder.py,sha256=tSNXFMJSrffagFi4egZJp8XZH9trSCwQjOdXKyHVqwo,37106
3
3
  autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
4
- autocoder/auto_coder_rag.py,sha256=flIIf-oj8Dkr8gk049rG0itze_M64SnfUsFGfdDIKa8,16034
4
+ autocoder/auto_coder_rag.py,sha256=EsUR48qiW9gxoN0Bc_zELtLLpA7nNKGnAS4-DmTv0R0,16408
5
5
  autocoder/auto_coder_server.py,sha256=qRY88mkBnqSGFDcwYE5gwpe2WPhIw1nEH6LdbjCQhQk,20306
6
6
  autocoder/chat_auto_coder.py,sha256=1jCx-J83mj_8JnojYSTfPjYide-thbmsFbr12E_kgcQ,81773
7
7
  autocoder/chat_auto_coder_lang.py,sha256=QYtu5gWEQmWKVovR_qUZ8plySZarNFX_Onk-1vN9IiA,8524
8
8
  autocoder/command_args.py,sha256=ftWw6HnFUZPiQPt1oV-SfpHQe69XN3knaFy1lpROBcU,26854
9
9
  autocoder/lang.py,sha256=e-07rYTgimpxS8sm-AxKSmH4kKQX4N05YFHJBg9trVs,12598
10
- autocoder/version.py,sha256=BM-OtnBUxQvJm_wNp8HpASr3pmsib4TI_U9nlRitsvA,23
10
+ autocoder/version.py,sha256=ktDcNL8tIbRnDNbYlfZyg2nqvyE1w6zvkc-asRWhXIE,23
11
11
  autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
13
13
  autocoder/agent/coder.py,sha256=dnITYHqkcOip8zV4lywbkYNH9w7Q3qyYaUArJ4WPrTs,866
@@ -17,7 +17,7 @@ autocoder/agent/project_reader.py,sha256=-MWRqsr7O4mvU0PIpAhOUBb29htZAvA37pa_GeE
17
17
  autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
19
19
  autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
20
- autocoder/common/__init__.py,sha256=AeO4fr0guA87tgYoE-pwKe0d5tc3yu-Z58UbYU2G_b4,10360
20
+ autocoder/common/__init__.py,sha256=luP0Rl-dFwlZjj56MOs51EHWCIEk6QnrjWN3CGTwFcw,10469
21
21
  autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
22
22
  autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
23
23
  autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
@@ -62,7 +62,7 @@ autocoder/rag/api_server.py,sha256=zokIlDJlk7ucRorSLQm80uICO1mecfmn4J2zVqEBskE,6
62
62
  autocoder/rag/doc_filter.py,sha256=Ha0Yae_G_hF72YzvrO7NoDZcG18K4hRcqGAEqfrIwAs,9330
63
63
  autocoder/rag/document_retriever.py,sha256=_jCbCEX0I-5UPWuHocESaWHatQcv1r_DqA0yOfOAiZ0,9092
64
64
  autocoder/rag/llm_wrapper.py,sha256=xRbTBpLUH43Ah5jplL8WWWU-kjKfNgEJoUntLGBq5F4,2484
65
- autocoder/rag/long_context_rag.py,sha256=8mcw4KarLI1MkmFvxyh44YVOJnbbEAnosVE19mKEJPE,21090
65
+ autocoder/rag/long_context_rag.py,sha256=id1zYmpN_xIax0g3wIKvPkM13uKs_P4guTSO9qRZQ-4,22173
66
66
  autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
67
67
  autocoder/rag/rag_entry.py,sha256=V1RJ8RGqM30DNPmzymv64rZjNRGWn6kfc8sRy_LECg0,2451
68
68
  autocoder/rag/raw_rag.py,sha256=yS2Ur6kG0IRjhCj2_VonwxjY_xls_E62jO5Gz5j2nqE,2952
@@ -101,9 +101,9 @@ autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1
101
101
  autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
102
102
  autocoder/utils/rest.py,sha256=3tXA8KZG6jKz_tddHNLGx77Icee88WcUeesfNsgPno4,8790
103
103
  autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
104
- auto_coder-0.1.185.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
105
- auto_coder-0.1.185.dist-info/METADATA,sha256=n_ENjtghSmCMV1YDNyzBx537gTxyyTL170DK0-LtqfM,2352
106
- auto_coder-0.1.185.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
107
- auto_coder-0.1.185.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
108
- auto_coder-0.1.185.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
109
- auto_coder-0.1.185.dist-info/RECORD,,
104
+ auto_coder-0.1.188.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
105
+ auto_coder-0.1.188.dist-info/METADATA,sha256=bofdx-szrMfFZjOWA4yET2IKlZPMFggYmIIIz6EResY,2352
106
+ auto_coder-0.1.188.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
107
+ auto_coder-0.1.188.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
108
+ auto_coder-0.1.188.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
109
+ auto_coder-0.1.188.dist-info/RECORD,,
@@ -256,6 +256,11 @@ def main(input_args: Optional[List[str]] = None):
256
256
  action="store_true",
257
257
  help="Enable deep thought in inference mode",
258
258
  )
259
+ serve_parser.add_argument(
260
+ "--inference_slow_without_deep_thought",
261
+ action="store_true",
262
+ help="Enable slow inference without deep thought",
263
+ )
259
264
 
260
265
  serve_parser.add_argument(
261
266
  "--enable_hybrid_index",
@@ -269,6 +274,12 @@ def main(input_args: Optional[List[str]] = None):
269
274
  help="The maximum number of tokens in the output. This is only used when enable_hybrid_index is true.",
270
275
  )
271
276
 
277
+ serve_parser.add_argument(
278
+ "--without_contexts",
279
+ action="store_true",
280
+ help="Whether to return responses without contexts. only works when pro plugin is installed",
281
+ )
282
+
272
283
  # Tools command
273
284
  tools_parser = subparsers.add_parser("tools", help="Various tools")
274
285
  tools_subparsers = tools_parser.add_subparsers(dest="tool", help="Available tools")
@@ -316,6 +316,8 @@ class AutoCoderArgs(pydantic.BaseModel):
316
316
 
317
317
  disable_inference_enhance: Optional[bool] = False
318
318
  inference_deep_thought: Optional[bool] = False
319
+ inference_slow_without_deep_thought: Optional[bool] = False
320
+ without_contexts: Optional[bool] = False
319
321
 
320
322
  class Config:
321
323
  protected_namespaces = ()
@@ -343,6 +343,30 @@ class LongContextRAG:
343
343
  )
344
344
  return (chunk[0] for chunk in chunks), context
345
345
 
346
+ if self.args.without_contexts and LLMComputeEngine is not None:
347
+ llm_compute_engine = LLMComputeEngine(
348
+ llm=self.llm,
349
+ inference_enhance=not self.args.disable_inference_enhance,
350
+ inference_deep_thought=self.args.inference_deep_thought,
351
+ inference_slow_without_deep_thought=self.args.inference_slow_without_deep_thought
352
+ )
353
+ conversations = conversations[:-1]
354
+ new_conversations = llm_compute_engine.process_conversation(
355
+ conversations, query, []
356
+ )
357
+
358
+ return (
359
+ llm_compute_engine.stream_chat_oai(
360
+ conversations=new_conversations,
361
+ model=model,
362
+ role_mapping=role_mapping,
363
+ llm_config=llm_config,
364
+ delta_mode=True,
365
+ ),
366
+ context,
367
+ )
368
+
369
+
346
370
  only_contexts = False
347
371
  try:
348
372
  v = json.loads(query)
@@ -500,7 +524,7 @@ class LongContextRAG:
500
524
  f"Start to send to model {target_model} with {request_tokens} tokens"
501
525
  )
502
526
 
503
- if LLMComputeEngine is not None:
527
+ if LLMComputeEngine is not None and not self.args.disable_inference_enhance:
504
528
  llm_compute_engine = LLMComputeEngine(
505
529
  llm=self.llm,
506
530
  inference_enhance=not self.args.disable_inference_enhance,
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.185"
1
+ __version__ = "0.1.188"