File size: 626 Bytes
7db0ae4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# #### What this tests ####
# #    This tests if the litellm model response type is returnable in a flask app

# import sys, os
# import traceback
# from flask import Flask, request, jsonify, abort, Response
# sys.path.insert(0, os.path.abspath('../../..'))  # Adds the parent directory to the system path

# import litellm
# from litellm import completion

# litellm.set_verbose = False

# app = Flask(__name__)

# @app.route('/')
# def hello():
#     data = request.json
#     return completion(**data)

# if __name__ == '__main__':
#     from waitress import serve
#     serve(app, host='localhost', port=8080, threads=10)