You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@property
def _invocation_params(self) -> Mapping[str, Any]:
"""Get the parameters used to invoke the model."""
pplx_creds: Dict[str, Any] = {
"api_key": self.pplx_api_key,
"api_base": "https://api.perplexity.ai",
"model": self.model,
"max_tokens": self.max_tokens,
}
return {**pplx_creds, **self._default_params}
System Info
System Information
OS: Darwin
OS Version: Darwin Kernel Version 24.1.0: Thu Oct 10 22:08:48 PDT 2024; root:xnu-11215.41.3~5/RELEASE_ARM64_T6000
Python Version: 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.3.9.4)]
aiohttp: 3.9.3
anthropic: 0.39.0
anthropic[vertexai]: Installed. No version info available.
async-timeout: 4.0.3
dataclasses-json: 0.6.7
defusedxml: 0.7.1
faker: Installed. No version info available.
google-cloud-aiplatform: 1.51.0
google-cloud-storage: 2.16.0
google-generativeai: 0.8.3
httpx: 0.27.2
jinja2: 3.1.2
jsonpatch: 1.33
numpy: 1.23.1
openai: 1.10.0
orjson: 3.10.2
packaging: 23.2
pandas: 2.2.0
pillow: 10.1.0
presidio-analyzer: Installed. No version info available.
presidio-anonymizer: Installed. No version info available.
pydantic: 2.9.2
pymongo: 4.8.0
PyYAML: 6.0.1
requests: 2.31.0
sentence-transformers: Installed. No version info available.
SQLAlchemy: 2.0.25
tabulate: 0.9.0
tenacity: 8.2.3
tiktoken: 0.5.2
typing-extensions: 4.9.0
vowpal-wabbit-next: Installed. No version info available.
The text was updated successfully, but these errors were encountered:
Hello, we are a group of students from the University of Toronto Scarborough. We are interested in working on this issue, and we hope to have a working PR soon.
Hi, I'm part of the team investigating this. I was able to successfully reproduce this error and found that not only is max_tokens not respected, neither is temperature and I presume the other kwargs as well. Your suggested fix unfortunately didn't work, but we're investigating another fix and should have have it by tomorrow.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
Perplexity Docs Example :
Langchain’s Current Implementation :
langchain/libs/community/langchain_community/chat_models/perplexity.py
Lines 147 to 156 in 1691884
langchain/libs/community/langchain_community/chat_models/perplexity.py
Lines 267 to 275 in 1691884
Suggestion :
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: