xusenlinzy / api-for-open-llm

Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
Apache License 2.0
2.33k stars 264 forks source link

运行 openai_api.py 启动以后 在执行request_test.py 报错 #222

Closed frog-game closed 8 months ago

frog-game commented 8 months ago

提交前必须检查以下项目 | The following items must be checked before submission

问题类型 | Type of problem

模型推理和部署 | Model inference and deployment

操作系统 | Operating system

Linux

详细描述问题 | Detailed description of the problem

image

Dependencies

pip list Package Version


accelerate 0.26.1 aiofiles 23.2.1 aiohttp 3.9.1 aioprometheus 23.12.0 aiosignal 1.3.1 altair 5.2.0 annotated-types 0.6.0 anyio 3.7.1 async-timeout 4.0.3 attrs 23.2.0 backoff 2.2.1 beautifulsoup4 4.12.2 bitsandbytes 0.42.0 blinker 1.7.0 bs4 0.0.1 certifi 2023.11.17 cffi 1.16.0 chardet 5.2.0 charset-normalizer 3.3.2 click 8.1.7 contourpy 1.2.0 cpm-kernels 1.0.11 cryptography 41.0.7 cycler 0.12.1 dataclasses-json 0.6.3 datasets 2.16.1 deepspeed 0.12.6 dill 0.3.7 distro 1.9.0 docstring-parser 0.15 dropout-layer-norm 0.1 einops 0.7.0 emoji 2.9.0 exceptiongroup 1.2.0 faiss-gpu 1.7.2 fastapi 0.109.0 ffmpy 0.3.1 filelock 3.13.1 filetype 1.2.0 fire 0.5.0 flash-attn 2.4.2 Flask 3.0.0 Flask-Cors 4.0.0 fonttools 4.47.2 frozenlist 1.4.1 fsspec 2023.10.0 gradio 3.38.0 gradio_client 0.8.0 greenlet 3.0.3 grpcio 1.60.0 h11 0.14.0 hjson 3.1.0 httpcore 1.0.2 httptools 0.6.1 httpx 0.26.0 huggingface-hub 0.20.2 humanize 4.9.0 idna 3.6 ijson 3.2.3 itsdangerous 2.1.2 jieba 0.42.1 Jinja2 3.1.3 joblib 1.3.2 jsonpatch 1.33 jsonpath-python 1.0.6 jsonpointer 2.4 jsonschema 4.21.0 jsonschema-specifications 2023.12.1 kiwisolver 1.4.5 langchain 0.1.1 langchain-community 0.0.13 langchain-core 0.1.11 langdetect 1.0.9 langsmith 0.0.81 latex2mathml 3.77.0 linkify-it-py 2.0.2 loguru 0.7.2 lxml 5.1.0 Markdown 3.5.2 markdown-it-py 2.2.0 MarkupSafe 2.1.3 marshmallow 3.20.2 matplotlib 3.8.2 mdit-py-plugins 0.3.3 mdtex2html 1.2.0 mdurl 0.1.2 mpmath 1.3.0 msgpack 1.0.7 multidict 6.0.4 multiprocess 0.70.15 mypy-extensions 1.0.0 networkx 3.2.1 ninja 1.11.1.1 nltk 3.8.1 numpy 1.26.3 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 openai 1.6.1 orjson 3.9.10 packaging 23.2 pandas 2.1.4 pdfminer.six 20221105 pdfplumber 0.10.3 peft 0.7.1 pillow 10.2.0 pip 23.3.1 plotly 5.18.0 prettytable 3.9.0 protobuf 4.25.2 psutil 5.9.7 py-cpuinfo 9.0.0 pyarrow 14.0.2 pyarrow-hotfix 0.6 pycparser 2.21 pydantic 1.10.13 pydantic_core 2.14.6 pydub 0.25.1 Pygments 2.17.2 PyMySQL 1.1.0 pynvml 11.5.0 pyparsing 3.1.1 pypdfium2 4.26.0 python-dateutil 2.8.2 python-dotenv 1.0.0 python-iso639 2024.1.2 python-magic 0.4.27 python-multipart 0.0.6 pytz 2023.3.post1 PyYAML 6.0.1 quantile-python 1.1 rapidfuzz 3.6.1 ray 2.6.0 referencing 0.32.1 regex 2023.12.25 requests 2.31.0 rich 13.7.0 rotary-emb 0.1 rouge-chinese 1.0.3 rpds-py 0.17.1 safetensors 0.4.1 scikit-learn 1.3.2 scipy 1.11.4 semantic-version 2.10.0 sentence-transformers 2.2.2 sentencepiece 0.1.99 setuptools 68.2.2 shtab 1.6.5 six 1.16.0 sniffio 1.3.0 soupsieve 2.5 SQLAlchemy 2.0.25 SQLAlchemy-Utils 0.41.1 sse-starlette 1.8.2 starlette 0.35.1 starlette-context 0.3.6 sympy 1.12 tabulate 0.9.0 tenacity 8.2.3 termcolor 2.4.0 threadpoolctl 3.2.0 tiktoken 0.5.2 tokenizers 0.15.0 toolz 0.12.0 torch 2.1.0 torchaudio 2.1.0 torchvision 0.16.0 tqdm 4.66.1 transformers 4.36.2 transformers-stream-generator 0.0.4 tree-format 0.1.2 triton 2.1.0 trl 0.7.9 typing_extensions 4.9.0 typing-inspect 0.9.0 tyro 0.6.4 tzdata 2023.4 uc-micro-py 1.0.2 unstructured 0.12.0 unstructured-client 0.15.2 urllib3 2.1.0 uvicorn 0.26.0 uvloop 0.19.0 vllm 0.2.7 watchfiles 0.21.0 wcwidth 0.2.13 websockets 11.0.3 Werkzeug 3.0.1 wheel 0.41.2 wrapt 1.16.0 xformers 0.0.23.post1 xxhash 3.4.1 yarl 1.9.4

运行日志或截图 | Runtime logs or screenshots

No response

xusenlinzy commented 8 months ago

pydantic版本问题

所有的 model_dump 改成 dict model_dump_json 改成 json

应该就可以

frog-game commented 8 months ago

这个试过了 会报这个错 image

然后pydantic 我升级到了这个版本一样报错 image

xusenlinzy commented 8 months ago

这个转发接口好久没更新了,我抽空更新一下哈

frog-game commented 8 months ago

好的等待你的修复

xusenlinzy commented 8 months ago

最新代码已经修复了