You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用的是Yi-VL-6B的模型,直接用single_inference.py脚本没有问题,但启动openai_api.py服务以后,一直是没法正常处理请求的。服务端的log显示TypeError: 'pydantic_core._pydantic_core.ValidatorIterator' object is not subscriptable
大家有遇到这种问题吗?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
使用的是Yi-VL-6B的模型,直接用single_inference.py脚本没有问题,但启动openai_api.py服务以后,一直是没法正常处理请求的。服务端的log显示TypeError: 'pydantic_core._pydantic_core.ValidatorIterator' object is not subscriptable
大家有遇到这种问题吗?
这是我服务端接收到的request?
{'model': 'yi-vl', 'frequency_penalty': 0.0, 'function_call': None, 'functions': None, 'logit_bias': None, 'max_tokens': 1024, 'n': 1, 'presence_penalty': 0.0, 'response_format': None, 'seed': None, 'stop': ['<|endoftext|>', '<|im_end|>'], 'temperature': 0.9, 'tool_choice': None, 'tools': None, 'top_p': 1.0, 'user': None, 'stream': False, 'repetition_penalty': 1.03, 'typical_p': None, 'watermark': False, 'best_of': 1, 'ignore_eos': False, 'use_beam_search': False, 'stop_token_ids': [8, 2, 6, 7], 'skip_special_tokens': True, 'spaces_between_special_tokens': True, 'min_p': 0.0, 'prompt_or_messages': [{'content': ValidatorIterator(index=0, schema=Some(Union(UnionValidator { mode: Smart, choices: [(TypedDict(TypedDictValidator { fields: [TypedDictField { name: "text", lookup_key: Simple { key: "text", py_key: Py(0x7f81053dacf0), path: LookupPath([S("text", Py(0x7f81053dad70))]) }, name_py: Py(0x7f81053d9d70), required: true, validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }) }, TypedDictField { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7f81053d9d30), path: LookupPath([S("type", Py(0x7f81053d9df0))]) }, name_py: Py(0x7f81053d9cf0), required: true, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"text": 0}), expected_py: None, values: [Py(0x7f81f3160b70)] }, expected_repr: "'text'", name: "literal['text']" }) }], extra_behavior: Ignore, extras_validator: None, strict: false, loc_by_alias: true }), None), (TypedDict(TypedDictValidator { fields: [TypedDictField { name: "image_url", lookup_key: Simple { key: "image_url", py_key: Py(0x7f81053d9830), path: LookupPath([S("image_url", Py(0x7f81053d9af0))]) }, name_py: Py(0x7f81053da130), required: true, validator: TypedDict(TypedDictValidator { fields: [TypedDictField { name: "url", lookup_key: Simple { key: "url", py_key: Py(0x7f81053d9b30), path: LookupPath([S("url", Py(0x7f81053d9db0))]) }, name_py: Py(0x7f81053d9e70), required: true, validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }) }, TypedDictField { name: "detail", lookup_key: Simple { key: "detail", py_key: Py(0x7f81053d98b0), path: LookupPath([S("detail", Py(0x7f81053d9930))]) }, name_py: Py(0x7f81053d97b0), required: false, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"auto": 0, "low": 1, "high": 2}), expected_py: None, values: [Py(0x7f81f23898b0), Py(0x7f81f18fa9f0), Py(0x7f81f18faa30)] }, expected_repr: "'auto', 'low' or 'high'", name: "literal['auto','low','high']" }) }], extra_behavior: Ignore, extras_validator: None, strict: false, loc_by_alias: true }) }, TypedDictField { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7f81053da230), path: LookupPath([S("type", Py(0x7f81053d97f0))]) }, name_py: Py(0x7f81053da1f0), required: true, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"image_url": 0}), expected_py: None, values: [Py(0x7f81f232a370)] }, expected_repr: "'image_url'", name: "literal['image_url']" }) }], extra_behavior: Ignore, extras_validator: None, strict: false, loc_by_alias: true }), None)], custom_error: None, strict: false, name: "union[typed-dict,typed-dict]" }))), 'role': 'user'}], 'echo': False}
总之没搞懂哪里可能有问题。完全按照demo走的
Beta Was this translation helpful? Give feedback.
All reactions