Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

core[patch]: Release 0.1.7 #15610

Merged
merged 4 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions libs/core/langchain_core/language_models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def agenerate_prompt(
prompt and additional model provider-specific output.
"""

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
@abstractmethod
def predict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
Expand All @@ -171,7 +171,7 @@ def predict(
Top model prediction as a string.
"""

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
@abstractmethod
def predict_messages(
self,
Expand All @@ -196,7 +196,7 @@ def predict_messages(
Top model prediction as a message.
"""

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
@abstractmethod
async def apredict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
Expand All @@ -217,7 +217,7 @@ async def apredict(
Top model prediction as a string.
"""

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
@abstractmethod
async def apredict_messages(
self,
Expand Down
12 changes: 6 additions & 6 deletions libs/core/langchain_core/language_models/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def _astream(
) -> AsyncIterator[ChatGenerationChunk]:
raise NotImplementedError()

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def __call__(
self,
messages: List[BaseMessage],
Expand Down Expand Up @@ -711,13 +711,13 @@ async def _call_async(
else:
raise ValueError("Unexpected generation type")

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def call_as_llm(
self, message: str, stop: Optional[List[str]] = None, **kwargs: Any
) -> str:
return self.predict(message, stop=stop, **kwargs)

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def predict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
) -> str:
Expand All @@ -731,7 +731,7 @@ def predict(
else:
raise ValueError("Cannot use predict when output is not a string.")

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def predict_messages(
self,
messages: List[BaseMessage],
Expand All @@ -745,7 +745,7 @@ def predict_messages(
_stop = list(stop)
return self(messages, stop=_stop, **kwargs)

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
async def apredict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
) -> str:
Expand All @@ -761,7 +761,7 @@ async def apredict(
else:
raise ValueError("Cannot use predict when output is not a string.")

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
async def apredict_messages(
self,
messages: List[BaseMessage],
Expand Down
9 changes: 5 additions & 4 deletions libs/core/langchain_core/language_models/llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ async def agenerate(
generations = [existing_prompts[i] for i in range(len(prompts))]
return LLMResult(generations=generations, llm_output=llm_output, run=run_info)

@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def __call__(
self,
prompt: str,
Expand Down Expand Up @@ -977,7 +978,7 @@ async def _call_async(
)
return result.generations[0][0].text

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def predict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
) -> str:
Expand All @@ -987,7 +988,7 @@ def predict(
_stop = list(stop)
return self(text, stop=_stop, **kwargs)

@deprecated("0.1.0", alternative="invoke", removal="0.2.0")
@deprecated("0.1.7", alternative="invoke", removal="0.2.0")
def predict_messages(
self,
messages: List[BaseMessage],
Expand All @@ -1003,7 +1004,7 @@ def predict_messages(
content = self(text, stop=_stop, **kwargs)
return AIMessage(content=content)

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
async def apredict(
self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any
) -> str:
Expand All @@ -1013,7 +1014,7 @@ async def apredict(
_stop = list(stop)
return await self._call_async(text, stop=_stop, **kwargs)

@deprecated("0.1.0", alternative="ainvoke", removal="0.2.0")
@deprecated("0.1.7", alternative="ainvoke", removal="0.2.0")
async def apredict_messages(
self,
messages: List[BaseMessage],
Expand Down
2 changes: 1 addition & 1 deletion libs/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-core"
version = "0.1.6"
version = "0.1.7"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"
Expand Down