Documentation Index
Fetch the complete documentation index at: https://translations.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 key를 생성하세요
api_key="<your-api-key>",
# 선택 사항: 사용량 추적을 위한 팀 및 프로젝트
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를 통해 서비스를 사용하세요.
- 사용 예제를 실행해 보세요.