现在有以下代码：from fastapi import APIRouter, Depends, Response
from sse_starlette.sse import EventSourceResponse
from app.dependencies import model_manager, process_qwen_infer_params, logger


router = APIRouter()


@router.get("/api/v1/llm/{model_name}")
def generate_by_model(
    model_name: str,
    infer_params: dict = Depends(process_qwen_infer_params),
):
    logger.info("接口调用")
    model = model_manager.get_model(model_name)

    return EventSourceResponse(model.predict(infer_params))  前端调用代码：with requests.get(
        # f"http://{api_host}:{api_port}/model/qwen",
        f"http://{api_host}:{api_port}/api/v1/llm/qwen",
        params={
            "message": message,
            "system_prompt": system_prompt,
            "temperature": temperature,
            "max_new_tokens": max_new_tokens,
            "top_p": top_p,
            "top_k": top_k,
        },
        stream=True,
    ) as response:
        try:
            response.raise_for_status()

            for chunk in response.iter_content(chunk_size=512, decode_unicode=True):
                if "result" in chunk:
                    result = json.loads(chunk.split(":", maxsplit=1)[1].strip())[
                        "result"
                    ]
                    if result:
                        yield result

                else:
                    pass
        except requests.exceptions.HTTPError as e:
            print(e)
现在调用后返回500报错，ns=1024&top_p=0.9&top_k=40 HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/data/environments/miniconda3/envs/fastai/lib/python3.11/site-packages/starlette/routing.py", line 773, in app
    match, child_scope = route.matches(scope)
                         ^^^^^^^^^^^^^
AttributeError: 'APIRouter' object has no attribute 'matches' 能分析一下原因吗