Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'llmName' File "M:\SD\sdwebui\extensions\sd-webui-oldsix-prompt\scripts\old_six_prompt.py", line 172, in setTransServer transObj['llmName']=postData['llmName'] #51

Open
swumagic opened this issue Apr 28, 2024 · 4 comments

Comments

@swumagic
Copy link

*** API error: POST: http://127.0.0.1:7860/api/sixgod/setTransServer {'error': 'KeyError', 'detail': '', 'body': '', 'errors': "'llmName'"}
Traceback (most recent call last):
File "M:\SD\sdwebui\py310\lib\site-packages\anyio\streams\memory.py", line 94, in receive
return self.receive_nowait()
File "M:\SD\sdwebui\py310\lib\site-packages\anyio\streams\memory.py", line 89, in receive_nowait
raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 78, in call_next
    message = await recv_stream.receive()
  File "M:\SD\sdwebui\py310\lib\site-packages\anyio\streams\memory.py", line 114, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "M:\SD\sdwebui\modules\api\api.py", line 186, in exception_handling
    return await call_next(request)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
    raise app_exc
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 157, in _create_span_call
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
  File "M:\SD\sdwebui\modules\api\api.py", line 150, in log_and_time
    res: Response = await call_next(req)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
    raise app_exc
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 157, in _create_span_call
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response
    await self.app(scope, receive, send)
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 157, in _create_span_call
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 256, in _sentry_exceptionmiddleware_call
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 157, in _create_span_call
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "<enhanced_experience vendors.sentry_sdk.integrations.starlette>", line 157, in _create_span_call
  File "M:\SD\sdwebui\py310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
    raise e
  File "M:\SD\sdwebui\py310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "M:\SD\sdwebui\py310\lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)
  File "<enhanced_experience vendors.sentry_sdk.integrations.fastapi>", line 136, in _sentry_app
  File "M:\SD\sdwebui\py310\lib\site-packages\fastapi\routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "M:\SD\sdwebui\py310\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function
    return await dependant.call(**values)
  File "M:\SD\sdwebui\extensions\sd-webui-oldsix-prompt\scripts\old_six_prompt.py", line 172, in setTransServer
    transObj['llmName']=postData['llmName']
KeyError: 'llmName'

Advanced elements visible: False

@thisjam
Copy link
Owner

thisjam commented Apr 29, 2024

设置里面配置下试试

@swumagic
Copy link
Author

大佬,设置怎么配置?我设置加了百度的KEY,也能正确加载翻译接口。大模型名称那里我填的wenxin,

@SaturMars
Copy link

如果没装llama_cpp哪怕是设置里关了大模型也会报这个错,
简单改法可以把old_six_prompt.py 172行改成下面这样:

transObj['llmName']=postData.get('llmName','')

懒得提PR了。。

@swumagic
Copy link
Author

swumagic commented May 1, 2024

TK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@thisjam @swumagic @SaturMars and others