futaringoto / futarin-api

「ふたりんごと」のAPI
https://futaringoto.github.io/futarin-api/
MIT License
1 stars 0 forks source link

CompletionObjectのmax_tokensの設定 #22

Closed shun-harutaro closed 1 month ago

shun-harutaro commented 1 month ago

概要

現在、APIに渡すのはChatGPTへのメッセージのみ

目的

実装方法・タスク

参考資料

shun-harutaro commented 1 month ago

https://platform.openai.com/docs/api-reference/chat/object

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "gpt-3.5-turbo-0125",
  "system_fingerprint": "fp_44709d6fcb",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "\n\nHello there, how may I assist you today?",
    },
    "logprobs": null,
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
  }
}
shun-harutaro commented 1 month ago

ひとまず。max_tokenのみ設定