mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
partner: Update Upstage Model Names and Remove Deprecated Model (#29093)
This PR updates model names in the upstage library to reflect the latest naming conventions and removes deprecated models. Changes: Renamed Models: - `solar-1-mini-chat` -> `solar-mini` - `solar-1-mini-embedding-query` -> `embedding-query` Removed Deprecated Models: - `layout-analysis` (replaced to `document-parse`) Reference: - https://console.upstage.ai/docs/getting-started/overview - https://github.com/langchain-ai/langchain-upstage/releases/tag/libs%2Fupstage%2Fv0.5.0 Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.
This commit is contained in:
parent
9f5fa50bbf
commit
9d290abccd
@ -50,7 +50,7 @@ Notebook | Description
|
|||||||
[press_releases.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/press_releases.ipynb) | Retrieve and query company press release data powered by [Kay.ai](https://kay.ai).
|
[press_releases.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/press_releases.ipynb) | Retrieve and query company press release data powered by [Kay.ai](https://kay.ai).
|
||||||
[program_aided_language_model.i...](https://github.com/langchain-ai/langchain/tree/master/cookbook/program_aided_language_model.ipynb) | Implement program-aided language models as described in the provided research paper.
|
[program_aided_language_model.i...](https://github.com/langchain-ai/langchain/tree/master/cookbook/program_aided_language_model.ipynb) | Implement program-aided language models as described in the provided research paper.
|
||||||
[qa_citations.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/qa_citations.ipynb) | Different ways to get a model to cite its sources.
|
[qa_citations.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/qa_citations.ipynb) | Different ways to get a model to cite its sources.
|
||||||
[rag_upstage_layout_analysis_groundedness_check.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/rag_upstage_layout_analysis_groundedness_check.ipynb) | End-to-end RAG example using Upstage Layout Analysis and Groundedness Check.
|
[rag_upstage_document_parse_groundedness_check.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/rag_upstage_document_parse_groundedness_check.ipynb) | End-to-end RAG example using Upstage Document Parse and Groundedness Check.
|
||||||
[retrieval_in_sql.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/retrieval_in_sql.ipynb) | Perform retrieval-augmented-generation (rag) on a PostgreSQL database using pgvector.
|
[retrieval_in_sql.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/retrieval_in_sql.ipynb) | Perform retrieval-augmented-generation (rag) on a PostgreSQL database using pgvector.
|
||||||
[sales_agent_with_context.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/sales_agent_with_context.ipynb) | Implement a context-aware ai sales agent, salesgpt, that can have natural sales conversations, interact with other systems, and use a product knowledge base to discuss a company's offerings.
|
[sales_agent_with_context.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/sales_agent_with_context.ipynb) | Implement a context-aware ai sales agent, salesgpt, that can have natural sales conversations, interact with other systems, and use a product knowledge base to discuss a company's offerings.
|
||||||
[self_query_hotel_search.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/self_query_hotel_search.ipynb) | Build a hotel room search feature with self-querying retrieval, using a specific hotel recommendation dataset.
|
[self_query_hotel_search.ipynb](https://github.com/langchain-ai/langchain/tree/master/cookbook/self_query_hotel_search.ipynb) | Build a hotel room search feature with self-querying retrieval, using a specific hotel recommendation dataset.
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# RAG using Upstage Layout Analysis and Groundedness Check\n",
|
"# RAG using Upstage Document Parse and Groundedness Check\n",
|
||||||
"This example illustrates RAG using [Upstage](https://python.langchain.com/docs/integrations/providers/upstage/) Layout Analysis and Groundedness Check."
|
"This example illustrates RAG using [Upstage](https://python.langchain.com/docs/integrations/providers/upstage/) Document Parse and Groundedness Check."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -23,16 +23,16 @@
|
|||||||
"from langchain_core.runnables.base import RunnableSerializable\n",
|
"from langchain_core.runnables.base import RunnableSerializable\n",
|
||||||
"from langchain_upstage import (\n",
|
"from langchain_upstage import (\n",
|
||||||
" ChatUpstage,\n",
|
" ChatUpstage,\n",
|
||||||
|
" UpstageDocumentParseLoader,\n",
|
||||||
" UpstageEmbeddings,\n",
|
" UpstageEmbeddings,\n",
|
||||||
" UpstageGroundednessCheck,\n",
|
" UpstageGroundednessCheck,\n",
|
||||||
" UpstageLayoutAnalysisLoader,\n",
|
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"model = ChatUpstage()\n",
|
"model = ChatUpstage()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"files = [\"/PATH/TO/YOUR/FILE.pdf\", \"/PATH/TO/YOUR/FILE2.pdf\"]\n",
|
"files = [\"/PATH/TO/YOUR/FILE.pdf\", \"/PATH/TO/YOUR/FILE2.pdf\"]\n",
|
||||||
"\n",
|
"\n",
|
||||||
"loader = UpstageLayoutAnalysisLoader(file_path=files, split=\"element\")\n",
|
"loader = UpstageDocumentParseLoader(file_path=files, split=\"element\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"docs = loader.load()\n",
|
"docs = loader.load()\n",
|
||||||
"\n",
|
"\n",
|
@ -24,7 +24,7 @@ class SolarChat(SolarCommon, ChatOpenAI): # type: ignore[override, override]
|
|||||||
|
|
||||||
from langchain_community.chat_models.solar import SolarChat
|
from langchain_community.chat_models.solar import SolarChat
|
||||||
|
|
||||||
solar = SolarChat(model="solar-1-mini-chat")
|
solar = SolarChat(model="solar-mini")
|
||||||
"""
|
"""
|
||||||
|
|
||||||
max_tokens: int = Field(default=1024)
|
max_tokens: int = Field(default=1024)
|
||||||
|
@ -70,7 +70,7 @@ class SolarEmbeddings(BaseModel, Embeddings):
|
|||||||
|
|
||||||
endpoint_url: str = "https://api.upstage.ai/v1/solar/embeddings"
|
endpoint_url: str = "https://api.upstage.ai/v1/solar/embeddings"
|
||||||
"""Endpoint URL to use."""
|
"""Endpoint URL to use."""
|
||||||
model: str = "solar-1-mini-embedding-query"
|
model: str = "embedding-query"
|
||||||
"""Embeddings model name to use."""
|
"""Embeddings model name to use."""
|
||||||
solar_api_key: Optional[SecretStr] = None
|
solar_api_key: Optional[SecretStr] = None
|
||||||
"""API Key for Solar API."""
|
"""API Key for Solar API."""
|
||||||
|
@ -44,7 +44,7 @@ class SolarCommon(BaseModel):
|
|||||||
base_url: str = SOLAR_SERVICE_URL_BASE
|
base_url: str = SOLAR_SERVICE_URL_BASE
|
||||||
solar_api_key: Optional[SecretStr] = Field(default=None, alias="api_key")
|
solar_api_key: Optional[SecretStr] = Field(default=None, alias="api_key")
|
||||||
"""Solar API key. Get it here: https://console.upstage.ai/services/solar"""
|
"""Solar API key. Get it here: https://console.upstage.ai/services/solar"""
|
||||||
model_name: str = Field(default="solar-1-mini-chat", alias="model")
|
model_name: str = Field(default="solar-mini", alias="model")
|
||||||
"""Model name. Available models listed here: https://console.upstage.ai/services/solar"""
|
"""Model name. Available models listed here: https://console.upstage.ai/services/solar"""
|
||||||
max_tokens: int = Field(default=1024)
|
max_tokens: int = Field(default=1024)
|
||||||
temperature: float = 0.3
|
temperature: float = 0.3
|
||||||
|
Loading…
Reference in New Issue
Block a user