llm-ie 1.2.1__py3-none-any.whl → 1.2.3__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.
llm_ie/prompt_editor.py CHANGED
@@ -85,7 +85,7 @@ class PromptEditor:
85
85
  messages = [{"role": "system", "content": self.system_prompt},
86
86
  {"role": "user", "content": prompt}]
87
87
  res = self.inference_engine.chat(messages, verbose=True)
88
- return res
88
+ return res["response"]
89
89
 
90
90
  def comment(self, draft:str) -> str:
91
91
  """
@@ -101,7 +101,7 @@ class PromptEditor:
101
101
  messages = [{"role": "system", "content": self.system_prompt},
102
102
  {"role": "user", "content": prompt}]
103
103
  res = self.inference_engine.chat(messages, verbose=True)
104
- return res
104
+ return res["response"]
105
105
 
106
106
  def clear_messages(self):
107
107
  """
@@ -175,7 +175,7 @@ class PromptEditor:
175
175
  self.messages.append({"role": "user", "content": user_input})
176
176
  print(f"{Fore.BLUE}Assistant: {Style.RESET_ALL}", end="")
177
177
  response = self.inference_engine.chat(self.messages, verbose=True)
178
- self.messages.append({"role": "assistant", "content": response})
178
+ self.messages.append({"role": "assistant", "content": response["response"]})
179
179
 
180
180
 
181
181
  def _IPython_chat(self):
@@ -229,7 +229,7 @@ class PromptEditor:
229
229
  # Get assistant's response and append it to conversation
230
230
  print("Assistant: ", end="")
231
231
  response = self.inference_engine.chat(self.messages, verbose=True)
232
- self.messages.append({"role": "assistant", "content": response})
232
+ self.messages.append({"role": "assistant", "content": response["response"]})
233
233
 
234
234
  # Display the assistant's response
235
235
  with output_area:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llm-ie
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: A comprehensive toolkit that provides building blocks for LLM-based named entity recognition, attribute extraction, and relation extraction pipelines.
5
5
  License: MIT
6
6
  Author: Enshuo (David) Hsu
@@ -1,4 +1,4 @@
1
- llm_ie/__init__.py,sha256=rLP01qXkIisX0WLzZOv6y494Braw89g5JLmA6ZyrGGA,1590
1
+ llm_ie/__init__.py,sha256=zG23MsRXnjShG-LhUl1tOSaEECXuhfZrS6Xt35XtrMw,1799
2
2
  llm_ie/asset/PromptEditor_prompts/chat.txt,sha256=Fq62voV0JQ8xBRcxS1Nmdd7DkHs1fGYb-tmNwctZZK0,118
3
3
  llm_ie/asset/PromptEditor_prompts/comment.txt,sha256=C_lxx-dlOlFJ__jkHKosZ8HsNAeV1aowh2B36nIipBY,159
4
4
  llm_ie/asset/PromptEditor_prompts/rewrite.txt,sha256=JAwY9vm1jSmKf2qcLBYUvrSmME2EJH36bALmkwZDWYQ,178
@@ -18,11 +18,11 @@ llm_ie/asset/prompt_guide/MultiClassRelationExtractor_prompt_guide.txt,sha256=EQ
18
18
  llm_ie/asset/prompt_guide/ReviewFrameExtractor_prompt_guide.txt,sha256=rBRIXg8JQWUHTRdoluTS0zkbTkBAacEtHHvr3lZaQCw,10437
19
19
  llm_ie/asset/prompt_guide/SentenceFrameExtractor_prompt_guide.txt,sha256=97_-y_vHMLG4Kb8fLsGgibLxB-3mest8k3LHfLo5h-I,10465
20
20
  llm_ie/asset/prompt_guide/SentenceReviewFrameExtractor_prompt_guide.txt,sha256=97_-y_vHMLG4Kb8fLsGgibLxB-3mest8k3LHfLo5h-I,10465
21
- llm_ie/chunkers.py,sha256=24h9l-Ldyx3EgfYicFqGhV_b-XofUS3yovC1nBWdDoo,5143
22
- llm_ie/data_types.py,sha256=72-3bzzYpo7KZpD9bjoroWT2eiM0zmWyDkBr2nHoBV0,18559
23
- llm_ie/engines.py,sha256=x8ZAzYkSfnFGyZP9fBjKp3eHSkuGneq94PDP4Zinvq0,36250
24
- llm_ie/extractors.py,sha256=aCRqKhjSoKTAWZ3WhX_O6V-S_rIvYhPsk78nZLDpQw8,95149
25
- llm_ie/prompt_editor.py,sha256=x900oDyAozdKlXrF8SDz7wAQ-ilE7orcKLdk_aM25fM,13150
26
- llm_ie-1.2.1.dist-info/METADATA,sha256=F-dAtCt3xjBX3yh1qm9E07fWWG9q0VAp0cZx9pBfbZU,728
27
- llm_ie-1.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
- llm_ie-1.2.1.dist-info/RECORD,,
21
+ llm_ie/chunkers.py,sha256=BTtqj2ZbAzl5s4nk9y5T12x7iTljSLfIio_u4s6Dq0Q,7611
22
+ llm_ie/data_types.py,sha256=6vefyGTgZcJBYgiuyfcbJN1ZKK4tNvOZf6HFpxFZngY,17792
23
+ llm_ie/engines.py,sha256=L28e4X6Qx0pcOzMMoRW1ecqudUbemF-KHrRLsYy9FRU,61987
24
+ llm_ie/extractors.py,sha256=MRZEF9YSnFAkDCYWYeUysIaRxBSN71MmUpiW3M0Jejk,103890
25
+ llm_ie/prompt_editor.py,sha256=nAgCJQY5kVWTAhmrngdWRG-JKxCCPBh0dyaUcIk_-c0,13198
26
+ llm_ie-1.2.3.dist-info/METADATA,sha256=ww7UImUpSUWKHjzM3UJpylgO00h_glXttMykdoRNc0g,728
27
+ llm_ie-1.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
+ llm_ie-1.2.3.dist-info/RECORD,,
File without changes