mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-10 21:35:08 +00:00
This PR adds scaffolding for langchain 1.0 entry package. Most contents have been removed. Currently remaining entrypoints for: * chat models * embedding models * memory -> trimming messages, filtering messages and counting tokens [we may remove this] * prompts -> we may remove some prompts * storage: primarily to support cache backed embeddings, may remove the kv store * tools -> report tool primitives Things to be added: * Selected agent implementations * Selected workflows * Common primitives: messages, Document * Primitives for type hinting: BaseChatModel, BaseEmbeddings * Selected retrievers * Selected text splitters Things to be removed: * Globals needs to be removed (needs an update in langchain core) Todos: * TBD indexing api (requires sqlalchemy which we don't want as a dependency) * Be explicit about public/private interfaces (e.g., likely rename chat_models.base.py to something more internal) * Remove dockerfiles * Update module doc-strings and README.md
12 lines
348 B
Python
12 lines
348 B
Python
import pytest
|
|
import pytest_socket
|
|
import requests
|
|
|
|
|
|
def test_socket_disabled() -> None:
|
|
"""This test should fail."""
|
|
with pytest.raises(pytest_socket.SocketBlockedError):
|
|
# Ignore S113 since we don't need a timeout here as the request
|
|
# should fail immediately
|
|
requests.get("https://www.example.com") # noqa: S113
|