전체 글
-
flask서버를 이용한 안드로이드앱 전송카테고리 없음 2023. 4. 3. 19:54
import flask app = flask.Flask(__name__) @app.route('/', methods=['GET', 'POST']) def handle_request(): postBody = flask.request.get_data() postBodyStr = postBody.decode('utf-8') print("Post Body:", postBodyStr) return "Flask Server & Android are Working Successfully" if __name__ == '__main__': app.run(host="192.168.168.163", port=5000, debug=True) implementation 'com.squareup.okhttp3:okhttp:3.4..
-
chatGPT 테스트 php 코드카테고리 없음 2023. 3. 12. 20:14
"gpt-3.5-turbo", "messages" => array( array( "role" => "user", "content" => $prompt ) ), "max_tokens" => 3000, "temperature" => 0.5,);$data_string = json_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, $data_s..
-
chatGPT 테스트 python 코드카테고리 없음 2023. 3. 12. 15:17
https://platform.openai.com/ OpenAI API An API for accessing new AI models developed by OpenAI platform.openai.com 가입하여 key를 발급 받는다. 그런데, 테스트는 할수 있고, 사용하려면 돈 내야 한다. import openai # Setting API key # You can obtain your key via # https://platform.openai.com/account/api-keys openai.api_key = "" # ChatGPT Context context = {"role": "system", "content": "Hello World!"} messages = [context] # Colors ..