my_openai_api icon indicating copy to clipboard operation
my_openai_api copied to clipboard

部署你自己的OpenAI api🤩, 基于flask, transformers (使用 Baichuan2-13B-Chat-4bits 模型, 可以运行在单张Tesla T4显卡) ,实现了OpenAI中Chat, Models和Completions接口,包含流式响应

Results 6 my_openai_api issues
Sort by recently updated
recently updated
newest added

请问可以返回usage中的token信息吗

`template = """Answer the following questions as best you can, but speaking as a pirate might speak. You have access to the following tools: {tools} Use the following format: Question:...

启动后,调用chat/completions接口,服务端报错: ![image](https://github.com/billvsme/my_openai_api/assets/20062034/319aa835-3ec9-41bf-8c38-ce6a29c1189e)

你好,我使用了你这个项目想要对使用Baichuan2微调后的模型进行api的部署,代码中修改了model_name为自己微调后模型的路径,使用postman进行api测试的时候,请问其中的Body部分的字段应该怎么填写?

完整代码如下:# encoding: utf-8 import json import time import uuid from threading import Thread import torch from flask import Flask, current_app, request, Blueprint, stream_with_context from flask_cors import CORS from transformers import...