- Embedding
- Chat
- Completion
langchain/chat_models 패키지에 해당하는 Chat을 중심으로 Qianfan과 함께 langchain을 사용하는 방법을 소개합니다:
API 초기화
Baidu Qianfan 기반 LLM 서비스를 사용하려면 다음 매개변수를 초기화해야 합니다: 환경 변수에서 AK, SK를 초기화하거나 init params에서 초기화할 수 있습니다:현재 지원되는 모델
- ERNIE-Bot-turbo (기본 모델)
- ERNIE-Bot
- BLOOMZ-7B
- Llama-2-7b-chat
- Llama-2-13b-chat
- Llama-2-70b-chat
- Qianfan-BLOOMZ-7B-compressed
- Qianfan-Chinese-Llama-2-7B
- ChatGLM2-6B-32K
- AquilaChat-7B
설정
사용법
Streaming
Qianfan에서 다른 모델 사용하기
기본 모델은 ERNIE-Bot-turbo이며, Ernie Bot 또는 서드파티 오픈소스 모델을 기반으로 자체 모델을 배포하려는 경우 다음 단계를 따르세요:- (선택사항, 모델이 기본 모델에 포함된 경우 건너뛰기) Qianfan Console에서 모델을 배포하고 사용자 정의 배포 endpoint를 가져옵니다.
- 초기화 시
endpoint필드를 설정합니다:
Model Params
현재ERNIE-Bot과 ERNIE-Bot-turbo만 아래 모델 매개변수를 지원하며, 향후 더 많은 모델을 지원할 수 있습니다.
- temperature
- top_p
- penalty_score
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.