KenyonY / openai-forward

🚀 大语言模型高效转发服务 · An efficient forwarding service designed for LLMs. · OpenAI API Reverse Proxy
https://api.openai-forward.com
MIT License
839 stars 288 forks source link

您好,这是什么问题? #100

Closed frankylv closed 11 months ago

frankylv commented 11 months ago

初始检查

问题描述

File "C:\Users\GXH.conda\envs\openai-forward-main\lib\site-packages\openai_forward\app.py", line 7, in from .forward.extra import generic_objs File "C:\Users\GXH.conda\envs\openai-forward-main\lib\site-packages\openai_forward\forward\extra.py", line 1, in from .base import GenericForward File "C:\Users\GXH.conda\envs\openai-forward-main\lib\site-packages\openai_forward\forward\base.py", line 15, in from ..cache.chat_completions import generate, stream_generate_efficient File "C:\Users\GXH.conda\envs\openai-forward-main\lib\site-packages\openai_forward\cache\chat_completions.py", line 121, in model: str, content: str | None, tool_calls: list | None, request: Request TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

配置/代码示例和输出

No response

我的见解

No response

环境

(openai-forward-main) PS D:\apython\openai-forward-main> python -c "import sys,platform; print('python: {}\nOS: {}'.format(sys.version, platform.syste m()));" python: 3.9.18 | packaged by conda-forge | (main, Aug 30 2023, 03:40:31) [MSC v.1929 64 bit (AMD64)] OS: Windows (openai-forward-main) PS D:\apython\openai-forward-main> python -c "import openai_forward; print('openai_forward: {}'.format(openai_forward._version _));" openai_forward: 0.6.7

最后一步

KenyonY commented 11 months ago

hi @frankylv 这里主要问题是python版本, 因为python3.10中才引入 X | Y 语法的类型联合运算符。所以目前代码需要python3.10以上版本才能运行。

0.6.9版本之后已支持到python3.8

frankylv commented 11 months ago

好的,谢谢

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年12月17日 17:58 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [KenyonY/openai-forward] 您好,这是什么问题? (Issue #100) |

Closed #100 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>