isa-model 0.3.2__py3-none-any.whl → 0.3.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.
@@ -89,6 +89,33 @@ class LangChainMessageAdapter:
89
89
  msg_dict["role"] = "user"
90
90
  elif msg.type == "ai":
91
91
  msg_dict["role"] = "assistant"
92
+ # Handle tool calls if present in LangChain AI messages
93
+ if hasattr(msg, 'tool_calls') and msg.tool_calls:
94
+ tool_calls = []
95
+ for tc in msg.tool_calls:
96
+ if isinstance(tc, dict):
97
+ # LangChain format: {"name": "func", "args": {...}, "id": "..."}
98
+ tool_call = {
99
+ "id": tc.get("id", f"call_{len(tool_calls)}"),
100
+ "type": "function",
101
+ "function": {
102
+ "name": tc.get("name", "unknown"),
103
+ "arguments": json.dumps(tc.get("args", {}))
104
+ }
105
+ }
106
+ else:
107
+ # Handle other tool call formats
108
+ tool_call = {
109
+ "id": getattr(tc, 'id', f"call_{len(tool_calls)}"),
110
+ "type": "function",
111
+ "function": {
112
+ "name": getattr(tc, 'name', 'unknown'),
113
+ "arguments": json.dumps(getattr(tc, 'args', {}))
114
+ }
115
+ }
116
+ tool_calls.append(tool_call)
117
+
118
+ msg_dict["tool_calls"] = tool_calls # type: ignore
92
119
  elif msg.type == "tool":
93
120
  msg_dict["role"] = "tool"
94
121
  if hasattr(msg, 'tool_call_id'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isa_model
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Unified AI model serving framework
5
5
  Author: isA_Model Contributors
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -43,7 +43,7 @@ isa_model/inference/services/embedding/ollama_embed_service.py,sha256=s6LPSh-D06
43
43
  isa_model/inference/services/embedding/openai_embed_service.py,sha256=cjAzmYXlY0XLgwemdlhhUVlDecgzFy2xn3DSycoYvdo,8474
44
44
  isa_model/inference/services/llm/__init__.py,sha256=C6t9w33j3Ap4oGcJal9-htifKe0rxwws_kC3F-_B_Ps,341
45
45
  isa_model/inference/services/llm/base_llm_service.py,sha256=SXxFhH2z1UYqt2ihiuursrKEjiiiC3vWCvRQVETsdVc,5238
46
- isa_model/inference/services/llm/llm_adapter.py,sha256=Zb9-M7lqnryOVN18U5zvpy67B-jlks2ZlhFU0gcIUDM,17201
46
+ isa_model/inference/services/llm/llm_adapter.py,sha256=_NUfFzTD0t0vjcTFBIz7JKA5BCCbjBwIzp8cV3LGZ98,18791
47
47
  isa_model/inference/services/llm/ollama_llm_service.py,sha256=c5xAdbbicskbxhivIQUse-QiUbCElR_Bo88wIA3dZUI,10194
48
48
  isa_model/inference/services/llm/openai_llm_service.py,sha256=e5GmO4YpVUBImQvQTZ26UwiAmHkU1RPl_vIa1dNe_NM,8148
49
49
  isa_model/inference/services/llm/triton_llm_service.py,sha256=ZFo7JoZ799Nvyi8Cz1jfWOa6TUn0hDRJtBrotadMAd4,17673
@@ -85,7 +85,7 @@ isa_model/training/core/config.py,sha256=oqgKpBvtzrN6jwLIQYQ2707lH6nmjrktRiSxp9i
85
85
  isa_model/training/core/dataset.py,sha256=XCFsnf0NUMU1dJpdvo_CAMyvXB-9_RCUEiy8TU50e20,7802
86
86
  isa_model/training/core/trainer.py,sha256=h5TjqjdFr0Fsv5y4-0siy1KmOlqLfliVaUXybvuoeXU,26932
87
87
  isa_model/training/core/utils.py,sha256=Nik0M2ssfNbWqP6fKO0Kfyhzr_H6Q19ioxB-qCYbn5E,8387
88
- isa_model-0.3.2.dist-info/METADATA,sha256=nzfl95_XbhGMH8eXAqOBsAp4qU_3QTGBVhfunEi6eXQ,12226
89
- isa_model-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
- isa_model-0.3.2.dist-info/top_level.txt,sha256=eHSy_Xb3kNkh2kK11mi1mZh0Wz91AQ5b8k2KFYO-rE8,10
91
- isa_model-0.3.2.dist-info/RECORD,,
88
+ isa_model-0.3.3.dist-info/METADATA,sha256=JR7HYP8HN8ZStGhRBuqFz-yH1SGnEE2I8BTU61c5QRU,12226
89
+ isa_model-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
+ isa_model-0.3.3.dist-info/top_level.txt,sha256=eHSy_Xb3kNkh2kK11mi1mZh0Wz91AQ5b8k2KFYO-rE8,10
91
+ isa_model-0.3.3.dist-info/RECORD,,