Skip to content

langchain-ai/langchain-template-poe-fastapi

Repository files navigation

langchain-template-poe-fastapi

Quick Start

Install dependencies

poetry install

Run the server. By default, the LangChainChatModelPoeHandler will be used, but others can be used by setting the POE_HANDLER environment variable (see __main__.py for more details).

make start

Make a request

curl -X 'POST' \
'http://0.0.0.0:8080/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ \
    "version": "1.0", \
    "type": "query", \
    "query": [ \
            { \
                    "message_id": "1", \
                    "role": "system", \
                    "content": "You are a helpful assistant.", \
                    "content_type": "text/markdown", \
                    "timestamp": 1678299819427621, \
                    "feedback": [] \
            }, \
            { \
                    "message_id": "2", \
                    "role": "user", \
                    "content": "What is the capital of Nepal?", \
                    "content_type": "text/markdown", \
                    "timestamp": 1678299819427621, \
                    "feedback": [] \
            } \
    ], \
    "user_id": "u-1234abcd5678efgh", \
    "conversation_id": "c-jklm9012nopq3456", \
    "message_id": "2" \
}' -N

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published