one-api icon indicating copy to clipboard operation
one-api copied to clipboard

请问如何兼容fireworks的api?

Open anrgct opened this issue 8 months ago • 4 comments

它有两种接口/v1/completions/v1/chat/completions,前者自定义渠道也不能用,不知道该如何添加渠道?

curl --request POST \
  --url https://api.fireworks.ai/inference/v1/completions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <API_KEY>' \
  --data '{ 
    "model": "accounts/fireworks/models/starcoder-7b",
    "max_tokens": 1024,
    "top_p": 1,
    "top_k": 40,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "temperature": 0.1,
    "prompt": ""
  }'

anrgct avatar May 27 '24 09:05 anrgct