Skip to content
Snippets Groups Projects
Commit 32b5601e authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix: python packaging

parent 81df9590
No related branches found
No related tags found
No related merge requests found
from typing import List from typing import List
from fastapi import APIRouter, Depends, HTTPException, status from fastapi import APIRouter, Depends, HTTPException, status
from llama_index import VectorStoreIndex from llama_index.chat_engine.types import BaseChatEngine
from llama_index.llms.base import ChatMessage from llama_index.llms.base import ChatMessage
from llama_index.llms.types import MessageRole from llama_index.llms.types import MessageRole
from pydantic import BaseModel from pydantic import BaseModel
...@@ -26,7 +26,7 @@ class _Result(BaseModel): ...@@ -26,7 +26,7 @@ class _Result(BaseModel):
@r.post("") @r.post("")
async def chat( async def chat(
data: _ChatData, data: _ChatData,
chat_engine: VectorStoreIndex = Depends(get_chat_engine), chat_engine: BaseChatEngine = Depends(get_chat_engine),
) -> _Result: ) -> _Result:
# check preconditions and get last message # check preconditions and get last message
if len(data.messages) == 0: if len(data.messages) == 0:
......
[tool.poetry] [tool.poetry]
name = "llamaindex-fastapi" name = "app"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Marcus Schiesser <mail@marcusschiesser.de>"] authors = ["Marcus Schiesser <mail@marcusschiesser.de>"]
......
[tool.poetry] [tool.poetry]
name = "llamaindex-fastapi-streaming" name = "app"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Marcus Schiesser <mail@marcusschiesser.de>"] authors = ["Marcus Schiesser <mail@marcusschiesser.de>"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment