mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 06:48:50 +00:00
core[minor], langchain[patch], experimental[patch]: Added missing py.typed
to langchain_core
(#14143)
See PR title. From what I can see, `poetry` will auto-include this. Please let me know if I am missing something here. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
from collections import defaultdict
|
||||
from html.parser import HTMLParser
|
||||
from typing import Any, DefaultDict, Dict, List, Optional
|
||||
from typing import Any, DefaultDict, Dict, List, Optional, cast
|
||||
|
||||
from langchain.callbacks.manager import (
|
||||
CallbackManagerForLLMRun,
|
||||
@@ -176,7 +176,7 @@ class AnthropicFunctions(BaseChatModel):
|
||||
response = self.model.predict_messages(
|
||||
messages, stop=stop, callbacks=run_manager, **kwargs
|
||||
)
|
||||
completion = response.content
|
||||
completion = cast(str, response.content)
|
||||
if forced:
|
||||
tag_parser = TagParser()
|
||||
|
||||
@@ -210,7 +210,7 @@ class AnthropicFunctions(BaseChatModel):
|
||||
message = AIMessage(content=msg, additional_kwargs=kwargs)
|
||||
return ChatResult(generations=[ChatGeneration(message=message)])
|
||||
else:
|
||||
response.content = response.content.strip()
|
||||
response.content = cast(str, response.content).strip()
|
||||
return ChatResult(generations=[ChatGeneration(message=response)])
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user