Closed hra42 closed 4 months ago
This is a result of our currently outdated python sdk on version 1.2.7. We will be updating this sdk to support the latest foundation models and the latest version of Pieces OS in the coming weeks.
For now, you'll simply just have to do a regular http GET request to localhost:1000/models
, or localhost:5323/models
if you're on linux, until we get this updated version of the python sdk published.
Here are the docs where you can find the endpoints for our ModelsApi
: https://docs.pieces.app/build/reference/python/apis/ModelsApi
@HRA42 Good news, we found a fix for this! Should be solved with v2.2.0
Bug Description
When running this code:
I get an ValidationError
Your operating system
Windows
Your python version (
python -V
)Python 3.12.x
Your Pieces OS Version
9.0.2
Additional Info
Logs: ValidationError: 1 validation error for Model foundation value is not a valid enumeration member; permitted: 'GPT_3.5', 'GPT_4', 'T5', 'LLAMA_2_7B', 'LLAMA_2_13B', 'LLAMA_2_70B', 'CODE_LLAMA_2_7B', 'CODE_LLAMA_2_13B', 'CODE_LLAMA_2_70B', 'BARD', 'ALPACA_7B', 'ALPACA_13B', 'ALPACA_33B', 'ALPACA_65B', 'VICUNA_7B', 'VICUNA_13B', 'VICUNA_33B', 'VICUNA_65B', 'GUANACO_7B', 'GUANACO_13B', 'GUANACO_33B', 'GUANACO_65B', 'OPENLLAMA_7B', 'OPENLLAMA_13B', 'GORILLA_7B', 'GORILLA_13B', 'GORILLA_33B', 'GORILLA_65B', 'WIZARDLM_7B', 'WIZARDLM_13B', 'WIZARDLM_30B', 'YULANCHAT_13B', 'YULANCHAT_65B', 'REDPAJAMA_3B', 'REDPAJAMA_7B', 'REDPAJAMA_13B', 'REDPAJAMA_33B', 'REDPAJAMA_65B', 'DOLLY_70M', 'DOLLY_160M', 'DOLLY_410M', 'DOLLY_1B', 'DOLLY_1.4B', 'DOLLY_2.8B', 'DOLLY_6.9B', 'DOLLY_12B', 'PYTHIA_70M', 'PYTHIA_160M', 'PYTHIA_410M', 'PYTHIA_1B', 'PYTHIA_1.4B', 'PYTHIA_2.8B', 'PYTHIA_6.9B', 'PYTHIA_12B', 'MOSS_7B', 'MOSS_13B', 'RMKV_LM_100M', 'RMKV_LM_400M', 'RMKV_LM_1.5B', 'RMKV_LM_3B', 'RMKV_LM_7B', 'RMKV_LM_14B', 'STARCODER_15.5B', 'WIZARDCODER_15B', 'SANTACODER_1.1B', 'TEXT_BISON', 'TEXTEMBEDDING_GECKO', 'CHAT_BISON', 'CODE_BISON', 'CODECHAT_BISON', 'CODE_GECKO', 'DISTILROBERTA', 'MISTRAL_7B', 'GEMINI', 'FAST_TEXT', 'UNIXCODER' (type=type_error.enum; enum_values=[<ModelFoundationEnum.GPT_3_DOT_5: 'GPT_3.5'>, <ModelFoundationEnum.GPT_4: 'GPT_4'>, <ModelFoundationEnum.T5: 'T5'>, <ModelFoundationEnum.LLAMA_2_7_B: 'LLAMA_2_7B'>, <ModelFoundationEnum.LLAMA_2_13_B: 'LLAMA_2_13B'>, <ModelFoundationEnum.LLAMA_2_70_B: 'LLAMA_2_70B'>, <ModelFoundationEnum.CODE_LLAMA_2_7_B: 'CODE_LLAMA_2_7B'>, <ModelFoundationEnum.CODE_LLAMA_2_13_B: 'CODE_LLAMA_2_13B'>, <ModelFoundationEnum.CODE_LLAMA_2_70_B: 'CODE_LLAMA_2_70B'>, <ModelFoundationEnum.BARD: 'BARD'>, <ModelFoundationEnum.ALPACA_7_B: 'ALPACA_7B'>, <ModelFoundationEnum.ALPACA_13_B: 'ALPACA_13B'>, <ModelFoundationEnum.ALPACA_33_B: 'ALPACA_33B'>, <ModelFoundationEnum.ALPACA_65_B: 'ALPACA_65B'>, <ModelFoundationEnum.VICUNA_7_B: 'VICUNA_7B'>, <ModelFoundationEnum.VICUNA_13_B: 'VICUNA_13B'>, <ModelFoundationEnum.VICUNA_33_B: 'VICUNA_33B'>, <ModelFoundationEnum.VICUNA_65_B: 'VICUNA_65B'>, <ModelFoundationEnum.GUANACO_7_B: 'GUANACO_7B'>, <ModelFoundationEnum.GUANACO_13_B: 'GUANACO_13B'>, <ModelFoundationEnum.GUANACO_33_B: 'GUANACO_33B'>, <ModelFoundationEnum.GUANACO_65_B: 'GUANACO_65B'>, <ModelFoundationEnum.OPENLLAMA_7_B: 'OPENLLAMA_7B'>, <ModelFoundationEnum.OPENLLAMA_13_B: 'OPENLLAMA_13B'>, <ModelFoundationEnum.GORILLA_7_B: 'GORILLA_7B'>, <ModelFoundationEnum.GORILLA_13_B: 'GORILLA_13B'>, <ModelFoundationEnum.GORILLA_33_B: 'GORILLA_33B'>, <ModelFoundationEnum.GORILLA_65_B: 'GORILLA_65B'>, <ModelFoundationEnum.WIZARDLM_7_B: 'WIZARDLM_7B'>, <ModelFoundationEnum.WIZARDLM_13_B: 'WIZARDLM_13B'>, <ModelFoundationEnum.WIZARDLM_30_B: 'WIZARDLM_30B'>, <ModelFoundationEnum.YULANCHAT_13_B: 'YULANCHAT_13B'>, <ModelFoundationEnum.YULANCHAT_65_B: 'YULANCHAT_65B'>, <ModelFoundationEnum.REDPAJAMA_3_B: 'REDPAJAMA_3B'>, <ModelFoundationEnum.REDPAJAMA_7_B: 'REDPAJAMA_7B'>, <ModelFoundationEnum.REDPAJAMA_13_B: 'REDPAJAMA_13B'>, <ModelFoundationEnum.REDPAJAMA_33_B: 'REDPAJAMA_33B'>, <ModelFoundationEnum.REDPAJAMA_65_B: 'REDPAJAMA_65B'>, <ModelFoundationEnum.DOLLY_70_M: 'DOLLY_70M'>, <ModelFoundationEnum.DOLLY_160_M: 'DOLLY_160M'>, <ModelFoundationEnum.DOLLY_410_M: 'DOLLY_410M'>, <ModelFoundationEnum.DOLLY_1_B: 'DOLLY_1B'>, <ModelFoundationEnum.DOLLY_1_DOT_4_B: 'DOLLY_1.4B'>, <ModelFoundationEnum.DOLLY_2_DOT_8_B: 'DOLLY_2.8B'>, <ModelFoundationEnum.DOLLY_6_DOT_9_B: 'DOLLY_6.9B'>, <ModelFoundationEnum.DOLLY_12_B: 'DOLLY_12B'>, <ModelFoundationEnum.PYTHIA_70_M: 'PYTHIA_70M'>, <ModelFoundationEnum.PYTHIA_160_M: 'PYTHIA_160M'>, <ModelFoundationEnum.PYTHIA_410_M: 'PYTHIA_410M'>, <ModelFoundationEnum.PYTHIA_1_B: 'PYTHIA_1B'>, <ModelFoundationEnum.PYTHIA_1_DOT_4_B: 'PYTHIA_1.4B'>, <ModelFoundationEnum.PYTHIA_2_DOT_8_B: 'PYTHIA_2.8B'>, <ModelFoundationEnum.PYTHIA_6_DOT_9_B: 'PYTHIA_6.9B'>, <ModelFoundationEnum.PYTHIA_12_B: 'PYTHIA_12B'>, <ModelFoundationEnum.MOSS_7_B: 'MOSS_7B'>, <ModelFoundationEnum.MOSS_13_B: 'MOSS_13B'>, <ModelFoundationEnum.RMKV_LM_100_M: 'RMKV_LM_100M'>, <ModelFoundationEnum.RMKV_LM_400_M: 'RMKV_LM_400M'>, <ModelFoundationEnum.RMKV_LM_1_DOT_5_B: 'RMKV_LM_1.5B'>, <ModelFoundationEnum.RMKV_LM_3_B: 'RMKV_LM_3B'>, <ModelFoundationEnum.RMKV_LM_7_B: 'RMKV_LM_7B'>, <ModelFoundationEnum.RMKV_LM_14_B: 'RMKV_LM_14B'>, <ModelFoundationEnum.STARCODER_15_DOT_5_B: 'STARCODER_15.5B'>, <ModelFoundationEnum.WIZARDCODER_15_B: 'WIZARDCODER_15B'>, <ModelFoundationEnum.SANTACODER_1_DOT_1_B: 'SANTACODER_1.1B'>, <ModelFoundationEnum.TEXT_BISON: 'TEXT_BISON'>, <ModelFoundationEnum.TEXTEMBEDDING_GECKO: 'TEXTEMBEDDING_GECKO'>, <ModelFoundationEnum.CHAT_BISON: 'CHAT_BISON'>, <ModelFoundationEnum.CODE_BISON: 'CODE_BISON'>, <ModelFoundationEnum.CODECHAT_BISON: 'CODECHAT_BISON'>, <ModelFoundationEnum.CODE_GECKO: 'CODE_GECKO'>, <ModelFoundationEnum.DISTILROBERTA: 'DISTILROBERTA'>, <ModelFoundationEnum.MISTRAL_7_B: 'MISTRAL_7B'>, <ModelFoundationEnum.GEMINI: 'GEMINI'>, <ModelFoundationEnum.FAST_TEXT: 'FAST_TEXT'>, <ModelFoundationEnum.UNIXCODER: 'UNIXCODER'>]) Traceback: File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 600, in _run_script exec(code, module.dict) File "C:\Code\python\Pieces-ChatBot-Loadtest\app.py", line 17, in
page_names_to_funcs[app]()
File "C:\Code\python\Pieces-ChatBot-Loadtest\internal\chatbot\chat.py", line 26, in chatbot
api_response = api_instance.models_snapshot()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 40, in wrapper_function
return vd.call(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 134, in call
return self.execute(m)
^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 206, in execute
return self.raw_function(d, var_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api\models_api.py", line 521, in models_snapshot
return self.models_snapshot_with_http_info(kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 40, in wrapper_function
return vd.call(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 134, in call
return self.execute(m)
^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\decorator.py", line 206, in execute
return self.raw_function(d, var_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api\models_api.py", line 611, in models_snapshot_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api_client.py", line 410, in call_api
return self.call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api_client.py", line 248, in __call_api
return_data = self.deserialize(response_data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api_client.py", line 320, in deserialize
return self.deserialize(data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api_client.py", line 359, in deserialize
return self.deserialize_model(data, klass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\api_client.py", line 759, in __deserialize_model
return klass.from_dict(data)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\models\models.py", line 82, in from_dict
"iterable": [Model.from_dict(_item) for _item in obj.get("iterable")] if obj.get("iterable") is not None else None
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pieces_os_client\models\model.py", line 116, in from_dict
_obj = Model.parse_obj({
^^^^^^^^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\main.py", line 526, in parse_obj
return cls(obj)
^^^^^^^^^^
File "C:\Code\python\Pieces-ChatBot-Loadtest.venv\Lib\site-packages\pydantic\main.py", line 341, in init
raise validation_error