isa-model 0.2.8__tar.gz → 0.2.9__tar.gz

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.
Files changed (94) hide show
  1. {isa_model-0.2.8 → isa_model-0.2.9}/PKG-INFO +1 -1
  2. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/llm/openai_llm_service.py +22 -4
  3. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model.egg-info/PKG-INFO +1 -1
  4. {isa_model-0.2.8 → isa_model-0.2.9}/pyproject.toml +1 -1
  5. {isa_model-0.2.8 → isa_model-0.2.9}/MANIFEST.in +0 -0
  6. {isa_model-0.2.8 → isa_model-0.2.9}/README.md +0 -0
  7. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/__init__.py +0 -0
  8. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/model_manager.py +0 -0
  9. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/model_registry.py +0 -0
  10. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/model_storage.py +0 -0
  11. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/storage/hf_storage.py +0 -0
  12. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/storage/local_storage.py +0 -0
  13. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/core/storage/minio_storage.py +0 -0
  14. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/__init__.py +0 -0
  15. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/core/__init__.py +0 -0
  16. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/core/deployment_config.py +0 -0
  17. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/core/deployment_manager.py +0 -0
  18. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/core/isa_deployment_service.py +0 -0
  19. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/gpu_int8_ds8/app/server.py +0 -0
  20. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/gpu_int8_ds8/scripts/test_client.py +0 -0
  21. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/deployment/gpu_int8_ds8/scripts/test_client_os.py +0 -0
  22. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/eval/__init__.py +0 -0
  23. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/eval/benchmarks.py +0 -0
  24. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/eval/factory.py +0 -0
  25. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/eval/metrics.py +0 -0
  26. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/__init__.py +0 -0
  27. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/adapter/unified_api.py +0 -0
  28. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/ai_factory.py +0 -0
  29. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/base.py +0 -0
  30. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/__init__.py +0 -0
  31. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/base_provider.py +0 -0
  32. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/ml_provider.py +0 -0
  33. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/model_cache_manager.py +0 -0
  34. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/ollama_provider.py +0 -0
  35. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/openai_provider.py +0 -0
  36. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/replicate_provider.py +0 -0
  37. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/providers/triton_provider.py +0 -0
  38. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/__init__.py +0 -0
  39. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/audio/base_stt_service.py +0 -0
  40. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/audio/base_tts_service.py +0 -0
  41. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/audio/openai_tts_service.py +0 -0
  42. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/base_service.py +0 -0
  43. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/embedding/base_embed_service.py +0 -0
  44. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/embedding/ollama_embed_service.py +0 -0
  45. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/embedding/openai_embed_service.py +0 -0
  46. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/llm/__init__.py +0 -0
  47. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/llm/base_llm_service.py +0 -0
  48. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/llm/ollama_llm_service.py +0 -0
  49. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/llm/triton_llm_service.py +0 -0
  50. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/ml/base_ml_service.py +0 -0
  51. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/ml/sklearn_ml_service.py +0 -0
  52. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/others/table_transformer_service.py +0 -0
  53. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/__init__.py +0 -0
  54. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/base_image_gen_service.py +0 -0
  55. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/base_vision_service.py +0 -0
  56. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/helpers/image_utils.py +0 -0
  57. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/helpers/text_splitter.py +0 -0
  58. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/ollama_vision_service.py +0 -0
  59. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/openai_vision_service.py +0 -0
  60. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/services/vision/replicate_image_gen_service.py +0 -0
  61. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/utils/conversion/bge_rerank_convert.py +0 -0
  62. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/utils/conversion/onnx_converter.py +0 -0
  63. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/inference/utils/conversion/torch_converter.py +0 -0
  64. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/scripts/inference_tracker.py +0 -0
  65. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/scripts/mlflow_manager.py +0 -0
  66. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/scripts/model_registry.py +0 -0
  67. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/scripts/start_mlflow.py +0 -0
  68. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/scripts/training_tracker.py +0 -0
  69. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/__init__.py +0 -0
  70. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/annotation_schema.py +0 -0
  71. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/processors/annotation_processor.py +0 -0
  72. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/storage/dataset_manager.py +0 -0
  73. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/storage/dataset_schema.py +0 -0
  74. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/tests/test_annotation_flow.py +0 -0
  75. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/tests/test_minio copy.py +0 -0
  76. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/tests/test_minio_upload.py +0 -0
  77. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/annotation/views/annotation_controller.py +0 -0
  78. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/cloud/__init__.py +0 -0
  79. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/cloud/job_orchestrator.py +0 -0
  80. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/cloud/runpod_trainer.py +0 -0
  81. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/cloud/storage_manager.py +0 -0
  82. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/core/__init__.py +0 -0
  83. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/core/config.py +0 -0
  84. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/core/dataset.py +0 -0
  85. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/core/trainer.py +0 -0
  86. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/core/utils.py +0 -0
  87. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model/training/factory.py +0 -0
  88. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model.egg-info/SOURCES.txt +0 -0
  89. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model.egg-info/dependency_links.txt +0 -0
  90. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model.egg-info/requires.txt +0 -0
  91. {isa_model-0.2.8 → isa_model-0.2.9}/isa_model.egg-info/top_level.txt +0 -0
  92. {isa_model-0.2.8 → isa_model-0.2.9}/setup.cfg +0 -0
  93. {isa_model-0.2.8 → isa_model-0.2.9}/setup.py +0 -0
  94. {isa_model-0.2.8 → isa_model-0.2.9}/tests/test_training_setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isa_model
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: Unified AI model serving framework
5
5
  Author: isA_Model Contributors
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -70,12 +70,16 @@ class OpenAILLMService(BaseLLMService):
70
70
  if isinstance(prompt, str):
71
71
  return await self.acompletion(prompt)
72
72
  elif isinstance(prompt, list):
73
+ if not prompt:
74
+ raise ValueError("Empty message list provided")
75
+
73
76
  # 检查是否是 LangGraph 消息对象
74
- if prompt and hasattr(prompt[0], 'content'):
77
+ first_msg = prompt[0]
78
+ if hasattr(first_msg, 'content') and hasattr(first_msg, 'type'):
75
79
  # 转换 LangGraph 消息对象为标准格式
76
80
  converted_messages = []
77
81
  for msg in prompt:
78
- if hasattr(msg, 'type'):
82
+ if hasattr(msg, 'type') and hasattr(msg, 'content'):
79
83
  # LangGraph 消息对象
80
84
  msg_dict = {"content": msg.content}
81
85
 
@@ -106,14 +110,28 @@ class OpenAILLMService(BaseLLMService):
106
110
  msg_dict["role"] = "user" # 默认为用户消息
107
111
 
108
112
  converted_messages.append(msg_dict)
109
- else:
113
+ elif isinstance(msg, dict):
110
114
  # 已经是字典格式
111
115
  converted_messages.append(msg)
116
+ else:
117
+ # 处理其他类型(如字符串)
118
+ converted_messages.append({"role": "user", "content": str(msg)})
112
119
 
113
120
  return await self.achat(converted_messages)
114
- else:
121
+ elif isinstance(first_msg, dict):
115
122
  # 标准字典格式的消息
116
123
  return await self.achat(prompt)
124
+ else:
125
+ # 处理其他格式,如字符串列表
126
+ converted_messages = []
127
+ for msg in prompt:
128
+ if isinstance(msg, str):
129
+ converted_messages.append({"role": "user", "content": msg})
130
+ elif isinstance(msg, dict):
131
+ converted_messages.append(msg)
132
+ else:
133
+ converted_messages.append({"role": "user", "content": str(msg)})
134
+ return await self.achat(converted_messages)
117
135
  else:
118
136
  raise ValueError("Prompt must be a string or a list of messages")
119
137
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isa_model
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: Unified AI model serving framework
5
5
  Author: isA_Model Contributors
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "isa_model"
7
- version = "0.2.8"
7
+ version = "0.2.9"
8
8
  description = "Unified AI model serving framework"
9
9
  authors = [{name = "isA_Model Contributors"}]
10
10
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes