Scaleway
Scaleway
LiteLLM은 Scaleway Generative APIs ↗에서 제공하는 모든 모델을 지원해요.
LiteLLM Python SDK와 함께 사용하기 (Usage with LiteLLM Python SDK)
import os
from litellm import completion
os.environ["SCW_SECRET_KEY"] = "your-scaleway-secret-key"
messages = [{"role": "user", "content": "Write a short poem"}]
response = completion(model="scaleway/qwen3-235b-a22b-instruct-2507", messages=messages)
print(response)
LiteLLM Proxy와 함께 사용하기 (Usage with LiteLLM Proxy)
1. config.yaml에 Scaleway 모델 설정
model_list:
- model_name: scaleway-model
litellm_params:
model: scaleway/qwen3-235b-a22b-instruct-2507
api_key: "os.environ/SCW_SECRET_KEY" # ensure you have `SCW_SECRET_KEY` in your .env
2. 프록시 시작
litellm --config config.yaml
3. 프록시 조회
프록시가 http://localhost:4000에서 실행 중이라고 가정할게요:
curl http://localhost:4000/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_L..._KEY" \
-d '{
"model": "scaleway-model",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Write a short poem"
}
]
}'
-H "Authorization: Bearer YOUR_L..._KEY"는 LiteLLM 마스터 키를 설정한 경우에만 필요해요.
지원 기능 (Supported features)
Scaleway 제공자는 Generative APIs 레퍼런스 문서 ↗에 있는 모든 기능(스트리밍, 구조화된 출력, 도구 호출 등)을 지원해요.
오디오 전사 (Audio transcription)
Scaleway의 /audio/transcriptions 엔드포인트는 OpenAI 호환이며 Whisper 모델과 함께 동작해요.
Python SDK
import os
from litellm import transcription
os.environ["SCW_SECRET_KEY"] = "your-scaleway-secret-key"
with open("speech.mp3", "rb") as audio_file:
response = transcription(
model="scaleway/whisper-large-v3",
file=audio_file,
)
print(response.text)
Proxy 설정
model_list:
- model_name: scaleway-whisper
litellm_params:
model: scaleway/whisper-large-v3
api_key: "os.environ/SCW_SECRET_KEY"
Proxy 요청
curl http://localhost:4000/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_L..._KEY" \
-F model="scaleway-whisper" \
-F file="@speech.mp3"
지원되는 선택 파라미터: language, prompt, response_format, temperature, timestamp_granularities.
출처: 문서