mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
chore(openrouter): update URL/title (#36204)
This commit is contained in:
@@ -154,23 +154,29 @@ class ChatOpenRouter(BaseChatModel):
|
||||
app_url: str | None = Field(
|
||||
default_factory=from_env(
|
||||
"OPENROUTER_APP_URL",
|
||||
default="https://docs.langchain.com/oss",
|
||||
default="https://docs.langchain.com",
|
||||
),
|
||||
)
|
||||
"""Application URL for OpenRouter attribution.
|
||||
|
||||
Maps to `HTTP-Referer` header.
|
||||
|
||||
Defaults to LangChain docs URL. Set this to your app's URL to get
|
||||
attribution for API usage in the OpenRouter dashboard.
|
||||
|
||||
See https://openrouter.ai/docs/app-attribution for details.
|
||||
"""
|
||||
|
||||
app_title: str | None = Field(
|
||||
default_factory=from_env("OPENROUTER_APP_TITLE", default="langchain"),
|
||||
default_factory=from_env("OPENROUTER_APP_TITLE", default="LangChain"),
|
||||
)
|
||||
"""Application title for OpenRouter attribution.
|
||||
|
||||
Maps to `X-Title` header.
|
||||
|
||||
Defaults to `'LangChain'`. Set this to your app's URL to get attribution for
|
||||
API usage in the OpenRouter dashboard.
|
||||
|
||||
See https://openrouter.ai/docs/app-attribution for details.
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user