MCPcopy
hub / github.com/baichuan-inc/Baichuan2 / generate_response

Function generate_response

OpenAI_api.py:53–56  ·  view source on GitHub ↗
(messages)

Source from the content-addressed store, hash-verified

51 return jsonify({"error": str(e)}), 500
52
53def generate_response(messages):
54 # Generate response using the model
55 response = model.chat(tokenizer, messages)
56 return response
57
58if __name__ == '__main__':
59 app.run(host='0.0.0.0', port=8000)

Callers 1

chat_completionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected