repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_anonymize | self.assertEqual | variable | 18 | import unittest
from isso import utils
from isso.utils import parse
class TestUtils(unittest.TestCase):
def test_anonymize(self):
examples = [
(u'12.34.56.78', u'12.34.56.0'),
(u'1234:5678:90ab:cdef:fedc:ba09:8765:4321',
u'1234:5678:90ab:0000:0000:0000:0000:0000'),
... | anonymized) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_thread | self.assertEqual | collection | 39 | import unittest
from isso import utils
from isso.utils import parse
class TestParse(unittest.TestCase):
def test_thread(self):
self.assertEqual(parse.thread("asdf"), (None, 'Untitled.'))
self.assertEqual(parse.thread("""
<html>
<head>
<title>Foo!</title>
... | ('test', 'Test')) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_thread | self.assertEqual | collection | 32 | import unittest
from isso import utils
from isso.utils import parse
class TestParse(unittest.TestCase):
def test_thread(self):
self.assertEqual(parse.thread("asdf"), (None, 'Untitled.'))
self.assertEqual(parse.thread("""
<html>
<head>
<title>Foo!</title>
... | (None, 'No way!')) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_thread | self.assertEqual | collection | 10 | import unittest
from isso import utils
from isso.utils import parse
class TestParse(unittest.TestCase):
def test_thread(self):
self.assertEqual(parse.thread("asdf"), | (None, 'Untitled.')) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_thread | self.assertEqual | collection | 43 | import unittest
from isso import utils
from isso.utils import parse
class TestParse(unittest.TestCase):
def test_thread(self):
self.assertEqual(parse.thread("asdf"), (None, 'Untitled.'))
self.assertEqual(parse.thread("""
<html>
<head>
<title>Foo!</title>
... | ('Fuu.', 'Untitled.')) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils.py | test_thread | self.assertEqual | collection | 12 | import unittest
from isso import utils
from isso.utils import parse
class TestParse(unittest.TestCase):
def test_thread(self):
self.assertEqual(parse.thread("asdf"), (None, 'Untitled.'))
self.assertEqual( | (None, 'Can you find me?')) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_custom | self.assertEqual | numeric_literal | 34 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestCreate(unittest.TestCase):
def test_custom(self):
def _new(val):
conf = config.new({
"hash": {
"algorithm": val,
... | 2) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_custom | self.assertEqual | numeric_literal | 30 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestCreate(unittest.TestCase):
def test_custom(self):
def _new(val):
conf = config.new({
"hash": {
"algorithm": val,
... | 16) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_hash | self.assertEqual | string_literal | 15 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestHasher(unittest.TestCase):
def test_hash(self):
self.assertRaises(TypeError, Hash, "Foo")
self.assertEqual(Hash(b"").salt, | b"") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_custom | self.assertIsInstance | variable | 24 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestCreate(unittest.TestCase):
def test_custom(self):
def _new(val):
conf = config.new({
"hash": {
"algorithm": val,
... | Hash) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_custom | self.assertEqual | string_literal | 35 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestCreate(unittest.TestCase):
def test_custom(self):
def _new(val):
conf = config.new({
"hash": {
"algorithm": val,
... | "md5") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_hash | self.assertEqual | string_literal | 21 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestHasher(unittest.TestCase):
def test_hash(self):
self.assertRaises(TypeError, Hash, "Foo")
self.assertEqual(Hash(b"").salt, b"")
self.assertEqual(Hash(... | b"...") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_custom | self.assertEqual | string_literal | 25 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestCreate(unittest.TestCase):
def test_custom(self):
def _new(val):
conf = config.new({
"hash": {
"algorithm": val,
... | "sha1") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_hash | self.assertIsInstance | collection | 22 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestHasher(unittest.TestCase):
def test_hash(self):
self.assertRaises(TypeError, Hash, "Foo")
self.assertEqual(Hash(b"").salt, b"")
self.assertEqual(Hash(... | (str, )) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_hash | self.assertRaises | variable | 13 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestHasher(unittest.TestCase):
def test_hash(self):
self.assertRaises( | TypeError) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_hash | self.assertEqual | complex_expr | 16 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestHasher(unittest.TestCase):
def test_hash(self):
self.assertRaises(TypeError, Hash, "Foo")
self.assertEqual(Hash(b"").salt, b"")
self.assertEqual(Hash... | Hash.salt) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_different_salt | self.assertNotEqual | func_call | 15 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestPBKDF2(unittest.TestCase):
def test_different_salt(self):
a = PBKDF2(b"a", iterations=1)
b = PBKDF2(b"b", iterations=1)
self.assertNotEqual(a.hash(b""... | b.hash(b"")) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_utils_hash.py | test_default | self.assertEqual | string_literal | 15 | from __future__ import unicode_literals
import unittest
from isso import config
from isso.utils.hash import Hash, PBKDF2, new
class TestPBKDF2(unittest.TestCase):
def test_default(self):
# original setting (and still default)
pbkdf2 = PBKDF2(iterations=1000)
self.assertEqual(pbkdf2.uha... | "42476aafe2e4") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testZeroLikes | self.assertEqual | numeric_literal | 41 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | 0) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testSingleLike | self.assertEqual | numeric_literal | 51 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | 1) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testSingleLike | self.assertEqual | numeric_literal | 50 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | 200) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testTooManyLikes | self.assertEqual | numeric_literal | 85 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | 142) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testVoteOnNonexistentComment | self.assertEqual | none_literal | 74 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | None) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_vote.py | testMultipleLikes | self.assertEqual | complex_expr | 69 | from __future__ import unicode_literals
import json
import tempfile
import pkg_resources
import unittest
from werkzeug.wrappers import Response
from isso import Isso, core, config
from isso.utils import http
from fixtures import curl, loads, FakeIP, JSONClient
http.curl = curl
class TestVote(unittest.TestCase):
... | num + 1) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_wsgi.py | test_urlsplit | self.assertEqual | variable | 18 | import unittest
from isso import wsgi
class TestWSGIUtilities(unittest.TestCase):
def test_urlsplit(self):
examples = [
("http://example.tld/", ('example.tld', 80, False)),
("https://example.tld/", ('example.tld', 443, True)),
("example.tld", ('example.tld', 80, False... | result) | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_wsgi.py | test_origin | self.assertEqual | string_literal | 13 | import unittest
from isso import wsgi
class TestWSGIUtilities(unittest.TestCase):
def test_origin(self):
self.assertEqual(wsgi.origin([])({}), "http://invalid.local")
origin = wsgi.origin(["http://foo.bar/", "https://foo.bar"])
self.assertEqual( | "http://foo.bar") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
isso-comments/isso | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | train | train | isso/tests/test_wsgi.py | test_origin | self.assertEqual | string_literal | 15 | import unittest
from isso import wsgi
class TestWSGIUtilities(unittest.TestCase):
def test_origin(self):
self.assertEqual(wsgi.origin([])({}), "http://invalid.local")
origin = wsgi.origin(["http://foo.bar/", "https://foo.bar"])
self.assertEqual(origin({"HTTP_ORIGIN": "http://foo.bar"}),... | "https://foo.bar") | 9e021cb6263e921ac519f52b82df3f66a297d3d1 | 118 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_anthropic_chat_model.py | test_anthropic_chat_model_complete_usage | assert | numeric_literal | 25 | from typing import Annotated
import pytest
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.message import Message, Usage, UserMessage
from magentic.function_call im... | 0 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_anthropic_chat_model.py | test_anthropic_chat_model_complete_parallel_function_call | assert | numeric_literal | 38 | from typing import Annotated
import pytest
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.message import Message, Usage, UserMessage
from magentic.function_call im... | 2 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_anthropic_chat_model.py | test_anthropic_chat_model_complete_raises_tool_schema_parse_error | pytest.raises | variable | 26 | from typing import Annotated
import pytest
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.message import Message, Usage, UserMessage
from magentic.function_call im... | ToolSchemaParseError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_litellm_chat_model.py | test_litellm_chat_model_custom_llm_provider | assert | string_literal | 34 | from typing import Annotated, Any, Iterator
import litellm
import pytest
from litellm.integrations.custom_logger import CustomLogger
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magenti... | "openai" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_litellm_chat_model.py | test_litellm_chat_model_metadata | assert | collection | 34 | from typing import Annotated, Any, Iterator
import litellm
import pytest
from litellm.integrations.custom_logger import CustomLogger
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magenti... | {"foo": "bar"} | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_litellm_chat_model.py | test_litellm_chat_model_complete_raises_tool_schema_parse_error | pytest.raises | variable | 39 | from typing import Annotated, Any, Iterator
import litellm
import pytest
from litellm.integrations.custom_logger import CustomLogger
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.base import ToolSchemaParseError
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magenti... | ToolSchemaParseError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_user_message_format | assert_* | variable | 25 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | str) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_usage | assert | none_literal | 22 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | None | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_function_result_message_format | assert_* | variable | 29 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | int) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_format_placeholder | assert_* | variable | 28 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | Country) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_placeholder | assert | string_literal | 27 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | "country" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_message_repr | assert | variable | 36 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | message_repr | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_user_message_format | assert_* | variable | 24 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | UserMessage) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_message_model_dump | assert | variable | 38 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | message_model_dump | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_placeholder | assert_* | complex_expr | 26 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | Placeholder[Country]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_format_str | assert_* | complex_expr | 24 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | AssistantMessage[str]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_function_result_message_eq | assert | variable | 26 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | function_result_message | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_user_message_format | assert | func_call | 26 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | UserMessage("Hello world") | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_format_placeholder | assert_* | complex_expr | 27 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | AssistantMessage[Country]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_function_result_message_format | assert_* | complex_expr | 28 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | FunctionResultMessage[int]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_format_str | assert | func_call | 26 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | AssistantMessage("Hello world") | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_function_result_message_eq | assert | func_call | 27 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | FunctionResultMessage(3, func_call) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_format_placeholder | assert | func_call | 29 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | AssistantMessage(Country(name="USA")) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_message.py | test_assistant_message_usage | assert | func_call | 26 | from unittest.mock import ANY, MagicMock
import pytest
from pydantic import BaseModel, TypeAdapter
from typing_extensions import assert_type
from magentic.chat_model.message import (
AnyMessage,
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
Usage,
... | Usage(input_tokens=1, output_tokens=2) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_mistral_chat_model.py | test_mistral_chat_model_complete_usage | assert | numeric_literal | 27 | import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
SystemMessage,
Usage,
UserMessage,
)
from magentic.chat_model.mistral_chat_model import MistralChatModel
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
Par... | 0 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_mistral_chat_model.py | test_mistral_chat_model_complete_parallel_function_call | assert | numeric_literal | 40 | import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
SystemMessage,
Usage,
UserMessage,
)
from magentic.chat_model.mistral_chat_model import MistralChatModel
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
Par... | 2 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_openai_chat_model_complete_usage | assert | numeric_literal | 40 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | 0 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_openai_chat_model_complete_seed | assert | complex_expr | 37 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | message2.content | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_openai_chat_model_azure_omits_stream_options | assert | complex_expr | 37 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | openai.NOT_GIVEN | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_openai_chat_model_api_key | pytest.raises | complex_expr | 37 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | openai.OpenAIError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_message_to_openai_message_raises | pytest.raises | variable | 41 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | NotImplementedError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_openai_chat_model_complete_raises_tool_schema_parse_error | pytest.raises | variable | 41 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | ToolSchemaParseError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_message_to_openai_message | assert | variable | 104 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | expected_openai_message | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_openai_chat_model.py | test_message_to_openai_message_raises | assert | collection | 48 | import os
from typing import Annotated, Any
from unittest.mock import ANY
import openai
import pytest
from openai.types.chat import ChatCompletionMessageParam
from pydantic import AfterValidator, BaseModel
from magentic._pydantic import ConfigDict, with_config
from magentic.chat_model.base import ToolSchemaParseError... | { "role": "user", "content": "Hello", } | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/chat_model/test_retry_chat_model.py | test_retry_chat_model_complete_openai | assert | string_literal | 30 | from typing import Annotated
import pytest
from pydantic import AfterValidator, BaseModel
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import UserMessage
from magentic.chat_model.openai_chat... | "Ireland" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_anthropic_chat_model | assert | numeric_literal | 26 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | 2 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_anthropic_chat_model | assert | numeric_literal | 25 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | 10 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_mistral_chat_model | assert | numeric_literal | 27 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | 42 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_mistral_chat_model | assert | numeric_literal | 26 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | 1024 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_openai_chat_model | assert | string_literal | 24 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "gpt-4" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_chat_model_context_within_context | assert | string_literal | 19 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "gpt-5" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_openai_chat_model | assert | string_literal | 26 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "openai" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_litellm_chat_model | assert | string_literal | 22 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "claude-2" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_chat_model_context | assert | variable | 17 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | chat_model | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_anthropic_chat_model | assert | string_literal | 23 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "sk-1234567890" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_backend.py | test_backend_mistral_chat_model | assert | string_literal | 23 | import pytest
from magentic.backend import get_chat_model
from magentic.chat_model.anthropic_chat_model import AnthropicChatModel
from magentic.chat_model.litellm_chat_model import LitellmChatModel
from magentic.chat_model.message import AssistantMessage, UserMessage
from magentic.chat_model.mistral_chat_model import ... | "mistral-large-latest" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_exec_function_call | assert | numeric_literal | 33 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | 3 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_exec_function_call_parallel_function_call | assert | numeric_literal | 34 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | 4 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_chat_add_message | assert | collection | 23 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | [] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_exec_function_call_raises | pytest.raises | variable | 28 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | TypeError) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_chat_last_message | assert | func_call | 22 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | UserMessage(content="two") | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_chat_submit | assert | func_call | 27 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | UserMessage(content="Hello") | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_chat_add_message | assert | collection | 24 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | [UserMessage(content="Hello")] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_exec_function_call | assert | func_call | 34 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | FunctionResultMessage(3, plus_1_2) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chat.py | test_exec_function_call_parallel_function_call | assert | func_call | 36 | from typing import Awaitable
import pytest
from magentic.chat import Chat
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
UserMessage,
)
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.prompt... | FunctionResultMessage(7, plus_3_4) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_call | assert | numeric_literal | 36 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | 1 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_escape_braces | assert | variable | 30 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | text | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_call | assert | string_literal | 35 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | "Hello!" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_call | assert | collection | 41 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | ["stop"] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_call | assert | collection | 40 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | [str, bool] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_format | assert | variable | 66 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | expected_messages | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatprompt_decorator_docstring | assert | string_literal | 31 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | "This is the docstring." | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_format_with_placeholder | assert | collection | 33 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | [AssistantMessage(Country(name="USA"))] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_chatprompt.py | test_chatpromptfunction_call | assert | collection | 37 | from inspect import getdoc
from unittest.mock import AsyncMock, Mock
import pytest
from pydantic import BaseModel
from magentic.chat_model.message import (
AssistantMessage,
FunctionResultMessage,
Placeholder,
SystemMessage,
ToolResultMessage,
UserMessage,
)
from magentic.chatprompt import (
... | [ UserMessage("Hello World.") ] | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_bulleted_list | assert_* | complex_expr | 8 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_bulleted_list():
items = BulletedList(["foo", "bar", "baz"])
assert_type(items, | BulletedList[str]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_numbered_list | assert_* | complex_expr | 8 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_numbered_list():
items = NumberedList(["foo", "bar", "baz"])
assert_type(items, | NumberedList[str]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_bulleted_list | assert | string_literal | 9 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_bulleted_list():
items = BulletedList(["foo", "bar", "baz"])
assert_type(items, BulletedList[str])
assert f"{items}" == | "- foo\n- bar\n- baz" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_bulleted_dict | assert_* | complex_expr | 8 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_bulleted_dict():
items = BulletedDict({"foo": 1, "bar": 2, "baz": 3})
assert_type(items, | BulletedDict[str, int]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_numbered_dict | assert_* | complex_expr | 8 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_numbered_dict():
items = NumberedDict({"foo": 1, "bar": 2, "baz": 3})
assert_type(items, | NumberedDict[str, int]) | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_numbered_list | assert | string_literal | 9 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_numbered_list():
items = NumberedList(["foo", "bar", "baz"])
assert_type(items, NumberedList[str])
assert f"{items}" == | "1. foo\n2. bar\n3. baz" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_bulleted_dict | assert | string_literal | 9 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_bulleted_dict():
items = BulletedDict({"foo": 1, "bar": 2, "baz": 3})
assert_type(items, BulletedDict[str, int])
assert f"{items}" == | "- foo: 1\n- bar: 2\n- baz: 3" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_formatting.py | test_numbered_dict | assert | string_literal | 9 | from typing_extensions import assert_type
from magentic.formatting import BulletedDict, BulletedList, NumberedDict, NumberedList
def test_numbered_dict():
items = NumberedDict({"foo": 1, "bar": 2, "baz": 3})
assert_type(items, NumberedDict[str, int])
assert f"{items}" == | "1. foo: 1\n2. bar: 2\n3. baz: 3" | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
jackmpcollins/magentic | 225c1b36f126ab8c39196073abda139130559440 | 98 | train | train | tests/test_function_call.py | test_function_call_async_function | assert | numeric_literal | 35 | import inspect
from typing import Awaitable
import pytest
from typing_extensions import assert_type
from magentic.function_call import (
AsyncParallelFunctionCall,
FunctionCall,
ParallelFunctionCall,
)
from magentic.streaming import async_iter
def plus(a: int, b: int) -> int:
return a + b
async def ... | 3 | 225c1b36f126ab8c39196073abda139130559440 | 98 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.