olca 0.2.36__py3-none-any.whl → 0.2.37__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.
olca/olcacli.py CHANGED
@@ -135,11 +135,19 @@ def extract_extra_directories_from_olca_config_system_and_user_input(system_inst
135
135
 
136
136
  def print_stream(stream):
137
137
  for s in stream:
138
- message = s["messages"][-1]
139
- if isinstance(message, tuple):
140
- print(message)
141
- else:
142
- message.pretty_print()
138
+ try:
139
+ # Handle different response formats
140
+ if isinstance(s, dict) and "messages" in s:
141
+ message = s["messages"][-1]
142
+ else:
143
+ message = s
144
+
145
+ if isinstance(message, tuple):
146
+ print(message)
147
+ else:
148
+ print(message.content)
149
+ except Exception as e:
150
+ print(s)
143
151
 
144
152
  def prepare_input(user_input, system_instructions,append_prompt=True, human=False):
145
153
  appended_prompt = system_instructions + SYSTEM_PROMPT_APPEND if append_prompt else system_instructions
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: olca
3
- Version: 0.2.36
3
+ Version: 0.2.37
4
4
  Summary: A Python package for experimental usage of Langchain and Human-in-the-Loop
5
5
  Home-page: https://github.com/jgwill/olca
6
6
  Author: Jean GUillaume ISabelle
@@ -0,0 +1,11 @@
1
+ olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
2
+ olca/fusewill_cli.py,sha256=Gf8CaYs7Uo4NH8QfgRNYalpmSUo047p9rzdkvIABHi8,7872
3
+ olca/fusewill_utils.py,sha256=IOIElqWCIsNzePlS1FZa5_35vySYLwbMUGW6UhNefIc,6065
4
+ olca/olcacli.py,sha256=yUHnASmkXn2FygwA-MhTzgaJOhD4yEvuqIp7ghote3o,14834
5
+ olca/tracing.py,sha256=A6K9K_mhCPS1_NncFv2-7hbeMkqfKT3XgUCERusbIYE,1248
6
+ olca-0.2.37.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
7
+ olca-0.2.37.dist-info/METADATA,sha256=oQql8pKoyL4SKiOlvHlUnmjEKYQwbF0P76iGH328i3M,25311
8
+ olca-0.2.37.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ olca-0.2.37.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
10
+ olca-0.2.37.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
11
+ olca-0.2.37.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
2
- olca/fusewill_cli.py,sha256=Gf8CaYs7Uo4NH8QfgRNYalpmSUo047p9rzdkvIABHi8,7872
3
- olca/fusewill_utils.py,sha256=IOIElqWCIsNzePlS1FZa5_35vySYLwbMUGW6UhNefIc,6065
4
- olca/olcacli.py,sha256=MBWanmGn1vWiy0S2lhe_dJc7u-B14n3ywA7lEP4qttM,14578
5
- olca/tracing.py,sha256=A6K9K_mhCPS1_NncFv2-7hbeMkqfKT3XgUCERusbIYE,1248
6
- olca-0.2.36.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
7
- olca-0.2.36.dist-info/METADATA,sha256=ovFeWWj5Xn2It7PqskYfvDNCSW0MjjO9bTKhb3y8DyY,25311
8
- olca-0.2.36.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
- olca-0.2.36.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
10
- olca-0.2.36.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
11
- olca-0.2.36.dist-info/RECORD,,
File without changes
File without changes