쿼리 매개변수
LibreChat에서 URL 쿼리 매개변수를 사용하여 채팅 대화를 구성하는 방법을 알아보세요. 모델, endpoint 및 대화 설정을 동적으로 지정할 수 있습니다.
LibreChat은 URL에서 직접 채팅 대화를 구성할 수 있습니다. 채팅 경로에 쿼리 매개변수를 추가하여 endpoint와 모델을 선택하거나, 입력을 미리 채우거나, 채팅이 로드되기 전에 대화 설정을 재정의할 수 있습니다.
Chat Paths
쿼리 매개변수는 유효한 채팅 경로를 따라야 합니다:
- 새로운 대화:
/c/new? - 기존 대화:
/c/[conversation-id]?(conversation-id는 기존 대화 ID)
https://your-domain.com/c/new?endpoint=ollama&model=llama3%3Alatest
https://your-domain.com/c/03debefd-6a50-438a-904d-1a806f82aad4?endpoint=openAI&model=o1-mini기본 사용법
endpoint 및 model 매개변수는 대부분의 경우를 다룹니다. 예측 가능한 결과를 얻으려면 둘 다 설정하세요:
https://your-domain.com/c/new?endpoint=azureOpenAI&model=o1-miniEndpoint 선택
모델 이름을 지정하지 않고 엔드포인트를 전환하려면 endpoint를 단독으로 사용하세요:
https://your-domain.com/c/new?endpoint=googleendpoint만 설정된 경우, LibreChat은 해당 엔드포인트에 대해 마지막으로 선택했던 모델(localStorage 기준)로 대체합니다. 이전에 선택한 기록이 없으면, 해당 엔드포인트 목록의 첫 번째 모델을 사용합니다.
endpoint 값은 다음 중 하나여야 합니다:
openAI, azureOpenAI, google, anthropic, assistants, azureAssistants, bedrock, agentscustom endpoint의 경우, 구성된 이름을 값으로 사용하세요(대소문자 구분 없음):
# endpoint=perplexity for a custom endpoint named `Perplexity`
https://your-domain.com/c/new?endpoint=perplexity&model=llama-3.1-sonar-small-128k-online모델 선택
현재 endpoint 내에서 모델을 전환하려면 model을 단독으로 사용하세요:
https://your-domain.com/c/new?model=gpt-4omodel만 설정된 경우, LibreChat은 해당 모델이 현재 endpoint에 존재하는 경우에만 이를 적용합니다. 현재 endpoint는 기본 endpoint이거나 마지막으로 선택된 endpoint입니다.
프롬프트
prompt 매개변수는 채팅 입력창을 미리 채웁니다:
https://your-domain.com/c/new?prompt=Explain quantum computingq는 prompt의 상호 교환 가능한 약어입니다:
https://your-domain.com/c/new?q=Explain quantum computing다른 매개변수와 결합하세요:
https://your-domain.com/c/new?endpoint=anthropic&model=claude-3-5-sonnet-20241022&prompt=Explain quantum computing자동 제출
submit=true를 추가하면 수동 확인 없이 프롬프트가 자동으로 전송됩니다:
https://your-domain.com/c/new?prompt=Explain quantum computing&submit=true이는 자동화된 워크플로우(Raycast, Alfred, Automator) 및 외부 통합에 유용합니다. 이를 다른 매개변수와 결합하여 완전히 스크립트화된 실행을 구현할 수 있습니다.
https://your-domain.com/c/new?endpoint=openAI&model=gpt-4&prompt=Explain quantum computing&submit=trueURL 인코딩
쿼리 값의 특수 문자는 URL 인코딩되어야 합니다. 일반적인 대체 문자는 다음과 같습니다:
| 문자 | 인코딩 |
|---|---|
: | %3A |
/ | %2F |
? | %3F |
# | %23 |
& | %26 |
= | %3D |
+ | %2B |
| 공백 | %20 (또는 +) |
예를 들어:
Original: `Write a function: def hello()`
Encoded: `/c/new?prompt=Write%20a%20function%3A%20def%20hello()`JavaScript의 내장 함수인 encodeURIComponent()가 인코딩을 처리합니다:
const prompt = "Write a function: def hello()";
const encodedPrompt = encodeURIComponent(prompt);
const url = `/c/new?prompt=${encodedPrompt}`;
console.log(url);브라우저 콘솔(Ctrl+Shift+I)에서 이 코드를 실행하여 인코딩된 URL을 확인하세요.
Specs, Agents, and Assistants
Model specs
이름으로 model spec을 선택하세요:
https://your-domain.com/c/new?spec=meeting-notes-gpt4이는 spec에 정의된 모든 설정을 불러옵니다. spec이 존재할 경우 URL의 다른 모델 매개변수는 무시됩니다.
Agents
엔드포인트 이름을 지정하지 않고 ID로 에이전트 로드하기:
https://your-domain.com/c/new?agent_id=your-agent-id이 설정은 endpoint를 자동으로 agents로 지정합니다.
Assistants
동일한 방식으로 ID를 통해 어시스턴트를 로드하세요:
https://your-domain.com/c/new?assistant_id=your-assistant-id이 설정은 endpoint를 자동으로 assistants로 지정합니다.
지원되는 매개변수
LibreChat 설정
| 매개변수 | 설명 |
|---|---|
maxContextTokens | 시스템 정의 컨텍스트 창을 재정의합니다. |
resendFiles | 후속 메시지에서 파일 재전송을 제어합니다. |
promptPrefix | 사용자 지정 지침 / 시스템 메시지를 설정합니다. |
imageDetail | 이미지 품질: low, auto 또는 high. OpenAI, OpenAI와 유사한 사용자 지정 endpoint 및 Azure OpenAI에만 적용됩니다(기본값은 auto). |
spec | 정확한 이름으로 model spec을 선택합니다. 설정 시, 다른 모델 매개변수는 무시되고 spec이 우선 적용됩니다. spec이 enforce: true로 구성된 경우, URL 쿼리 매개변수가 작동하려면 이 매개변수가 필요할 수 있습니다. |
fileTokenLimit | 비용 및 리소스 사용량을 제어하기 위한 파일 처리 최대 토큰 제한입니다. 요청 값이 YAML 기본값을 재정의합니다. |
모델 매개변수
지원되는 모델 매개변수는 endpoint에 따라 다릅니다. 값은 해당 제공업체의 API에 따라 유효해야 합니다.
OpenAI, Custom, Azure OpenAI:
temperature, presence_penalty, frequency_penalty, stop, top_p, max_tokens,
reasoning_effort, reasoning_summary, verbosity, useResponsesApi, web_search, disableStreamingGoogle, Anthropic:
topP, topK, maxOutputTokens, thinking, thinkingBudget, thinkingLevel, web_search, url_contextGoogle endpoint의 경우, url_context=true를 설정하면 지원되는 Gemini 텍스트 모델이 사용자 메시지에 포함된 URL을 읽을 수 있습니다. URL Context가 활성화되면 YouTube URL은 기본 비디오 이해 기능을 통해 처리됩니다.
Anthropic, Bedrock (Anthropic 모델), OpenRouter 커스텀 endpoint:
promptCache를 true 또는 false로 설정하여 프롬프트 캐싱을 전환합니다. 프롬프트 캐싱이 활성화되었을 때 캐시 유지 시간을 선택하려면 promptCacheTtl을 5m 또는 1h로 설정하세요:
promptCache
promptCacheTtl=1h자세한 내용은 Anthropic prompt caching docs 및 Bedrock prompt caching docs를 참조하세요.
Bedrock:
# Bedrock region
region=us-west-2
# Bedrock equivalent of `max_tokens`
maxTokens=200
# Bedrock reasoning effort (for supported models like ZAI, MoonshotAI)
reasoning_effort=mediumAssistants / Azure Assistants:
# Overrides existing assistant instructions for the current run
instructions=your+instructions# Adds the current date and time to `additional_instructions` for each run
append_current_datetime=true이 매개변수 대부분은 Model Spec Preset Fields와 공유되므로, 전체 참조는 해당 문서를 확인하세요.
예시
하나의 URL에 여러 매개변수 포함:
https://your-domain.com/c/new?endpoint=google&model=gemini-2.0-flash-exp&temperature=0.7&prompt=Oh hi mark프롬프트와 함께 Model Specs 로드하기:
https://your-domain.com/c/new?spec=meeting-notes-gpt4&prompt=Here%20is%20the%20transcript...spec를 사용할 때는 다른 모델 매개변수는 무시되며, 대신 spec의 구성이 우선 적용됩니다.
유효성 검사
모든 매개변수는 적용되기 전에 LibreChat의 스키마에 따라 검증됩니다. 유효하지 않은 매개변수와 값은 무시되며, 유효한 설정만 대화에 적용됩니다.
쿼리 매개변수를 신중하게 사용하세요
- 오남용 또는 제공업체 제한을 초과할 경우 API 오류가 발생할 수 있습니다.
- 잘못된 요청(bad request) 오류가 발생하면 New Chat을 클릭하여 대화를 재설정하세요.
- 선택한 endpoint가 해당 매개변수를 지원하지 않는 경우, 매개변수는 아무런 효과가 없습니다.
모범 사례
- 가능한 경우
endpoint와model을 모두 설정하세요. - 전달하는 각 매개변수를 해당 endpoint가 지원하는지 확인하세요.
- 제공자의 제한 내에서 값을 유지하세요.
- URL을 공유하기 전에 매개변수 조합을 테스트하세요.
쿼리 매개변수를 사용하면 특정 대화 구성을 쉽게 공유하고, 다양한 채팅 설정을 즐겨찾기에 추가하며, 외부 도구에서 채팅 시작을 자동화할 수 있습니다.
이 가이드는 어떤가요?