Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-update-training-api-26.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
W&B Inference를 사용하면 W&B Weave 및 OpenAI 호환 API를 통해 주요 오픈 소스 파운데이션 모델에 엑세스할 수 있습니다. 다음이 가능합니다:
Weave를 통해 W&B Inference 기반 애플리케이션을 추적, 평가, 모니터링 및 개선할 수 있습니다.
퀵스타트
다음은 Python을 사용한 간단한 예시입니다:
import openai
client = openai.OpenAI(
# 커스텀 base URL은 W&B Inference를 가리킵니다.
base_url='https://api.inference.wandb.ai/v1',
# https://wandb.ai/settings 에서 API 키를 생성하세요.
api_key="<your-api-key>",
# 선택 사항: 사용량 추적을 위한 Team 및 프로젝트
project="<your-team>/<your-project>",
)
response = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke."}
],
)
print(response.choices[0].message.content)
다음 단계
- 사용 가능한 모델 및 사용 정보와 제한 사항 확인
- 사전 요구 사항을 사용하여 계정 설정
- API 또는 UI를 통해 서비스 사용
- 사용 예시 시도해 보기
사용 세부 정보