• Your Name's avatar
    Fix UnboundLocalError for StreamingResponse in chat_completions · 70a6cfe1
    Your Name authored
    The issue was caused by importing StreamingResponse and JSONResponse inside
    the chat_completions function. In Python, when you have an import statement
    anywhere inside a function, it creates a local variable for that name
    throughout the entire function scope. This caused the code in the original
    implementation path to fail because Python saw StreamingResponse as an
    unassigned local variable.
    
    Fix: Move StreamingResponse and JSONResponse imports to module level and
    remove redundant imports from inside the function.
    70a6cfe1
Name
Last commit
Last update
.vscode Loading commit data...
codai Loading commit data...
.gitignore Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
aaa Loading commit data...
build.sh Loading commit data...
coder Loading commit data...
coderai Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
requirements.txt~ Loading commit data...