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
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_parser_get_name_aggr
assert
collection
42
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
[Frame("", 2)]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_parser_get_name_aggr_with_nested
assert
collection
69
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
[Frame("", 21)]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_parser_get_name_aggr_with_nested
assert
collection
68
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
[Frame("", 1), Frame("", 2)]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_parser_get_name_aggr_with_previous_occrance
assert
collection
59
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
[Frame("", 1), Frame("", 3)]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_protobuf_parse_gorouting_mapping
assert
func_call
91
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
Function( id=1, filename="/usr/local/go/src/runtime/proc.go", name="runtime.gopark", start_line=0, system_name="runtime.gopark", )
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_pprof_parse/test_golang_pprof.py
test_protobuf_parse_gorouting_mapping
assert
func_call
62
import datetime import json from flameshow.models import Frame, Profile, SampleType from flameshow.pprof_parser.parser import ProfileParser from flameshow.pprof_parser.parser import ( Function, Line, Location, Mapping, ProfileParser, get_frame_tree, parse_profile, unmarshal, ) from ..u...
Location( id=1, mapping=Mapping( id=1, memory_start=4194304, memory_limit=11280384, file_offset=0, filename="/usr/bin/node-exporter", build_id="", has_functions=True, has_filenames=False, has_line_numbers=False, has_inline_frames=False, ), address=4435364, lines=[ Line( line_no=336, function=Function( id=1, filename="/...
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_profile_parser.py
test_pile_up
assert
collection
17
from flameshow.pprof_parser.parser import Line, PprofFrame, Frame def test_pile_up(): root = Frame("root", 0, values=[5]) s1 = Frame("s1", 1, values=[4], parent=root) s2 = Frame("s2", 2, values=[4], parent=s1) root.children = [s1] s1.children = [s2] s1 = Frame("s1", 3, values=[3], parent=None...
[7]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_profile_parser.py
test_pile_up
assert
collection
18
from flameshow.pprof_parser.parser import Line, PprofFrame, Frame def test_pile_up(): root = Frame("root", 0, values=[5]) s1 = Frame("s1", 1, values=[4], parent=root) s2 = Frame("s2", 2, values=[4], parent=s1) root.children = [s1] s1.children = [s2] s1 = Frame("s1", 3, values=[3], parent=None...
[6]
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_profile_parser.py
test_render_detail_when_parent_zero
assert
variable
11
from flameshow.pprof_parser.parser import Line, PprofFrame, Frame def test_render_detail_when_parent_zero(): root = PprofFrame("root", 0, values=[0]) s1 = PprofFrame("s1", 1, values=[0], parent=root, root=root) s1.line = Line() s1.line.function.name = "asdf" detail = s1.render_detail(0, "bytes") ...
detail
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_app.py
test_app_set_title_after_mount
assert
variable
21
from textual.geometry import Size from flameshow.models import Frame, Profile, SampleType from flameshow.render.app import FlameGraphScroll, FlameshowApp from unittest.mock import MagicMock, patch, PropertyMock def test_app_set_title_after_mount(): r = Frame("root", 0) p = Profile( filename="abc", ...
r
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_app.py
test_app_set_title_after_mount
assert
string_literal
22
from textual.geometry import Size from flameshow.models import Frame, Profile, SampleType from flameshow.render.app import FlameGraphScroll, FlameshowApp from unittest.mock import MagicMock, patch, PropertyMock def test_app_set_title_after_mount(): r = Frame("root", 0) p = Profile( filename="abc", ...
"count"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_app.py
test_app_set_title_after_mount
assert
string_literal
19
from textual.geometry import Size from flameshow.models import Frame, Profile, SampleType from flameshow.render.app import FlameGraphScroll, FlameshowApp from unittest.mock import MagicMock, patch, PropertyMock def test_app_set_title_after_mount(): r = Frame("root", 0) p = Profile( filename="abc", ...
"flameshow"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_app.py
_test_scroll
assert
variable
19
from textual.geometry import Size from flameshow.models import Frame, Profile, SampleType from flameshow.render.app import FlameGraphScroll, FlameshowApp from unittest.mock import MagicMock, patch, PropertyMock def _test_scroll(line_no, height, expected_center): fc = FlameGraphScroll() size = Magic...
expected_center
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_action_move_down
assert
numeric_literal
42
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
2
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_action_move_down_children_is_zero
assert
numeric_literal
41
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
1
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_render_on_mouse_move
assert
numeric_literal
67
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
0
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_action_zoom_in_zoom_out
assert
numeric_literal
35
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
42
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_action_zoom_in_zoom_out
assert
numeric_literal
31
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
123
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_render_on_mouse_move
assert
bool_literal
64
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
True
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_flamegraph.py
test_flamegraph_action_move_down
assert
bool_literal
41
from unittest.mock import MagicMock import pytest from textual.events import MouseMove from flameshow.exceptions import RenderException from flameshow.models import Frame from flameshow.pprof_parser.parser import Line, PprofFrame, Profile, SampleType from flameshow.render.flamegraph import FlameGraph, FrameMap, add_a...
False
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_detail.py
test_render_self_value_all_instance
assert
numeric_literal
19
from flameshow.models import Profile from flameshow.render.framedetail import FrameStatAll from ..utils import create_frame def test_render_self_value_all_instance(): root = create_frame( { "id": 0, "values": [10], "children": [ {"id": 1, "values": [4], "...
6
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_detail.py
test_render_self_value_all_instance
assert
numeric_literal
25
from flameshow.models import Profile from flameshow.render.framedetail import FrameStatAll from ..utils import create_frame def test_render_self_value_all_instance(): root = create_frame( { "id": 0, "values": [10], "children": [ {"id": 1, "values": [4], "...
4
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_header.py
test_flameshow_header
assert
numeric_literal
14
from rich.text import Text, Span from flameshow.render.header import ( HeaderIcon, HeaderTitle, HeaderOpenedFilename, FlameshowHeader, ) def test_flameshow_header(): fh = FlameshowHeader("foo.out") result = list(fh.compose()) assert len(result) ==
2
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_header.py
test_header_icon
assert
string_literal
13
from rich.text import Text, Span from flameshow.render.header import ( HeaderIcon, HeaderTitle, HeaderOpenedFilename, FlameshowHeader, ) def test_header_icon(): hi = HeaderIcon() assert hi.render() ==
"🔥"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_header.py
test_header_opened_filename
assert
func_call
13
from rich.text import Text, Span from flameshow.render.header import ( HeaderIcon, HeaderTitle, HeaderOpenedFilename, FlameshowHeader, ) def test_header_opened_filename(): hf = HeaderOpenedFilename("goro.out") assert hf.render() ==
Text("goro.out")
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_render/test_render_header.py
test_header_title
assert
func_call
15
from rich.text import Text, Span from flameshow.render.header import ( HeaderIcon, HeaderTitle, HeaderOpenedFilename, FlameshowHeader, ) def test_header_title(): ht = HeaderTitle() ht.text = "abc" ht.sub_text = "foo" assert ht.render() ==
Text("abc — foo", spans=[Span(6, 9, "dim")])
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_utils.py
test_sizeof
assert
string_literal
5
from flameshow.utils import sizeof def test_sizeof(): assert sizeof(1) ==
"1.0B"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_utils.py
test_sizeof
assert
string_literal
6
from flameshow.utils import sizeof def test_sizeof(): assert sizeof(1) == "1.0B" assert sizeof(2048) ==
"2.0KiB"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
laixintao/flameshow
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
train
train
tests/test_utils.py
test_sizeof
assert
string_literal
7
from flameshow.utils import sizeof def test_sizeof(): assert sizeof(1) == "1.0B" assert sizeof(2048) == "2.0KiB" assert
"5.8YiB"
0c22a39da05c34bcdcaf90fae6554dfab2ad7b77
19
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_http_client.py
test_get_json_request_body
assert
none_literal
13
from langfuse.api.core.http_client import get_request_body from langfuse.api.core.request_options import RequestOptions def get_request_options() -> RequestOptions: return {"additional_body_parameters": {"see you": "later"}} def test_get_json_request_body() -> None: json_body, data_body = get_request_body( ...
None
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_http_client.py
test_get_json_request_body
assert
collection
12
from langfuse.api.core.http_client import get_request_body from langfuse.api.core.request_options import RequestOptions def get_request_options() -> RequestOptions: return {"additional_body_parameters": {"see you": "later"}} def test_get_json_request_body() -> None: json_body, data_body = get_request_body( ...
{"hello": "world"}
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_http_client.py
test_get_none_request_body
assert
collection
19
from langfuse.api.core.http_client import get_request_body from langfuse.api.core.request_options import RequestOptions def get_request_options() -> RequestOptions: return {"additional_body_parameters": {"see you": "later"}} def test_get_none_request_body() -> None: json_body, data_body = get_request_body( ...
{"see you": "later"}
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_http_client.py
test_get_json_request_body
assert
collection
22
from langfuse.api.core.http_client import get_request_body from langfuse.api.core.request_options import RequestOptions def get_request_options() -> RequestOptions: return {"additional_body_parameters": {"see you": "later"}} def test_get_json_request_body() -> None: json_body, data_body = get_request_body( ...
{"goodbye": "world", "see you": "later"}
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_query_encoding.py
test_query_encoding
assert
collection
5
from langfuse.api.core.query_encoder import encode_query def test_query_encoding() -> None: assert encode_query({"hello world": "hello world"}) ==
{ "hello world": "hello world" }
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_query_encoding.py
test_query_encoding
assert
collection
8
from langfuse.api.core.query_encoder import encode_query def test_query_encoding() -> None: assert encode_query({"hello world": "hello world"}) == { "hello world": "hello world" } assert encode_query({"hello_world": {"hello": "world"}}) ==
{ "hello_world[hello]": "world" }
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
langfuse/api/tests/utils/test_query_encoding.py
test_query_encoding
assert
collection
11
from langfuse.api.core.query_encoder import encode_query def test_query_encoding() -> None: assert encode_query({"hello world": "hello world"}) == { "hello world": "hello world" } assert encode_query({"hello_world": {"hello": "world"}}) == { "hello_world[hello]": "world" } asser
{ "hello_world[hello][world]": "today", "hello_world[test]": "this", "hi": "there", }
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_core_sdk.py
test_invalid_score_data_does_not_raise_exception
assert
numeric_literal
38
import os import time from asyncio import gather from datetime import datetime, timedelta, timezone from time import sleep import pytest from langfuse import Langfuse from langfuse.client import ( FetchObservationResponse, FetchObservationsResponse, FetchSessionsResponse, FetchTraceResponse, Fetch...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_core_sdk.py
test_create_numeric_score
assert
numeric_literal
59
import os import time from asyncio import gather from datetime import datetime, timedelta, timezone from time import sleep import pytest from langfuse import Langfuse from langfuse.client import ( FetchObservationResponse, FetchObservationsResponse, FetchSessionsResponse, FetchTraceResponse, Fetch...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_datasets.py
test_create_dataset_item
assert
numeric_literal
42
import json import os import time from concurrent.futures import ThreadPoolExecutor from typing import List from langchain import LLMChain, OpenAI, PromptTemplate from langfuse import Langfuse from langfuse.api.resources.commons.types.observation import Observation from langfuse.decorators import langfuse_context, ob...
3
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_datasets.py
test_linking_observation
assert
numeric_literal
25
import json import os import time from concurrent.futures import ThreadPoolExecutor from typing import List from langchain import LLMChain, OpenAI, PromptTemplate from langfuse import Langfuse from langfuse.api.resources.commons.types.observation import Observation from langfuse.decorators import langfuse_context, ob...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_datasets.py
test_get_runs
assert
numeric_literal
56
import json import os import time from concurrent.futures import ThreadPoolExecutor from typing import List from langchain import LLMChain, OpenAI, PromptTemplate from langfuse import Langfuse from langfuse.api.resources.commons.types.observation import Observation from langfuse.decorators import langfuse_context, ob...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_datasets.py
test_observe_dataset_run
assert
numeric_literal
112
import json import os import time from concurrent.futures import ThreadPoolExecutor from typing import List from langchain import LLMChain, OpenAI, PromptTemplate from langfuse import Langfuse from langfuse.api.resources.commons.types.observation import Observation from langfuse.decorators import langfuse_context, ob...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_decorators.py
test_nested_observations
assert
numeric_literal
74
import asyncio from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from contextvars import ContextVar from time import sleep from typing import Optional import pytest from langchain.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from langfuse.decorators imp...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_decorators.py
test_nested_observations
assert
numeric_literal
91
import asyncio from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from contextvars import ContextVar from time import sleep from typing import Optional import pytest from langchain.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from langfuse.decorators imp...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_decorators.py
test_nested_observations
assert
numeric_literal
103
import asyncio from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from contextvars import ContextVar from time import sleep from typing import Optional import pytest from langchain.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from langfuse.decorators imp...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_decorators.py
test_decorators_llama_index
assert
numeric_literal
85
import asyncio from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from contextvars import ContextVar from time import sleep from typing import Optional import pytest from langchain.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from langfuse.decorators imp...
3
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_decorators.py
test_asyncio_concurrency_inside_nested_span
assert
numeric_literal
76
import asyncio from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from contextvars import ContextVar from time import sleep from typing import Optional import pytest from langchain.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from langfuse.decorators imp...
4
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_logging.py
test_catch_and_log_errors_logs_error_silently
assert
numeric_literal
16
import logging import pytest from langfuse.utils.error_logging import ( catch_and_log_errors, auto_decorate_methods_with, ) def function_that_raises(): raise ValueError("This is a test error.") def test_catch_and_log_errors_logs_error_silently(caplog): function_that_raises() assert len(caplog.r...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_logging.py
test_catch_and_log_errors_logs_error_silently
assert
complex_expr
18
import logging import pytest from langfuse.utils.error_logging import ( catch_and_log_errors, auto_decorate_methods_with, ) def function_that_raises(): raise ValueError("This is a test error.") def test_catch_and_log_errors_logs_error_silently(caplog): function_that_raises() assert len(caplog.re...
caplog.text
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_logging.py
test_catch_and_log_errors_logs_error_silently
assert
complex_expr
17
import logging import pytest from langfuse.utils.error_logging import ( catch_and_log_errors, auto_decorate_methods_with, ) def function_that_raises(): raise ValueError("This is a test error.") def test_catch_and_log_errors_logs_error_silently(caplog): function_that_raises() assert len(caplog.re...
logging.ERROR
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_logging.py
test_auto_decorate_class_methods
pytest.raises
complex_expr
32
import logging import pytest from langfuse.utils.error_logging import ( catch_and_log_errors, auto_decorate_methods_with, ) def function_that_raises(): raise ValueError("This is a test error.") def test_auto_decorate_class_methods(caplog): test_obj = TestClass() # Test the instance method te...
ValueError, match="Error in instance method.")
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_parsing.py
test_generate_error_message_generic_exception
assert
variable
19
from langfuse.request import APIErrors, APIError from langfuse.parse_error import ( generate_error_message, generate_error_message_fern, ) from langfuse.api.resources.commons.errors import ( AccessDeniedError, MethodNotAllowedError, NotFoundError, UnauthorizedError, ) from langfuse.api.core impo...
expected_message
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_error_parsing.py
test_generate_error_message_api_error
assert
func_call
19
from langfuse.request import APIErrors, APIError from langfuse.parse_error import ( generate_error_message, generate_error_message_fern, ) from langfuse.api.resources.commons.errors import ( AccessDeniedError, MethodNotAllowedError, NotFoundError, UnauthorizedError, ) from langfuse.api.core impo...
generate_error_message(exception)
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_extract_model.py
test_entire_llm_call
assert
numeric_literal
88
from typing import Any from unittest.mock import MagicMock from langchain_anthropic import ChatAnthropic from langchain_google_vertexai import ChatVertexAI from langchain_groq import ChatGroq import pytest from langfuse.callback import CallbackHandler from langfuse.extract_model import _extract_model_name from langch...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_extract_model.py
test_models
assert
variable
96
from typing import Any from unittest.mock import MagicMock from langchain_anthropic import ChatAnthropic from langchain_google_vertexai import ChatVertexAI from langchain_groq import ChatGroq import pytest from langfuse.callback import CallbackHandler from langfuse.extract_model import _extract_model_name from langch...
expected_model
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_extract_model_langchain_openai.py
test_entire_llm_call_using_langchain_openai
assert
numeric_literal
48
from langchain_openai import AzureChatOpenAI, ChatOpenAI, OpenAI import pytest from langfuse.callback import CallbackHandler from tests.utils import get_api @pytest.mark.parametrize( # noqa: F821 "expected_model,model", [ ("gpt-3.5-turbo", ChatOpenAI()), ("gpt-3.5-turbo-instruct", OpenAI()), ...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_extract_model_langchain_openai.py
test_entire_llm_call_using_langchain_openai
assert
complex_expr
51
from langchain_openai import AzureChatOpenAI, ChatOpenAI, OpenAI import pytest from langfuse.callback import CallbackHandler from tests.utils import get_api @pytest.mark.parametrize( # noqa: F821 "expected_model,model", [ ("gpt-3.5-turbo", ChatOpenAI()), ("gpt-3.5-turbo-instruct", OpenAI()), ...
generation.model
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_encoder
assert
variable
30
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
result
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_decoder_without_langchain_serializer_with_none
assert
string_literal
43
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
"null"
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_decoder_without_langchain_serializer_with_none
assert
variable
44
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
default
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_observation_level
assert
string_literal
35
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
'"ERROR"'
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_decoder_without_langchain_serializer_with_langchain_message
pytest.raises
variable
34
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
ImportError)
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_data_uuid
assert
string_literal
37
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
f'"{str(test_id)}"'
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_decoder_pydantic
assert
string_literal
21
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
'{"foo": "bar", "bar": "2021-01-01T00:00:00Z"}'
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_json_decoder_without_langchain_serializer
assert
string_literal
28
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
'{"foo": "John", "bar": "2021-01-01T00:00:00Z"}'
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_json.py
test_data_class
assert
string_literal
45
import builtins from dataclasses import dataclass import importlib import json from datetime import datetime, timezone, date from unittest.mock import patch import uuid from bson import ObjectId import pytest from langchain.schema.messages import HumanMessage from pydantic import BaseModel import langfuse from langfu...
'{"name": "widget", "unit_price": 3.0, "quantity_on_hand": 10}'
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain.py
test_callback_generated_from_trace_chain
assert
numeric_literal
74
import os import random import string import time from time import sleep from typing import Any, Dict, List, Literal, Mapping, Optional import pytest from langchain.agents import AgentType, initialize_agent from langchain.chains import ( ConversationalRetrievalChain, ConversationChain, LLMChain, Retrie...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain.py
test_callback_generated_from_trace_chain
assert
numeric_literal
96
import os import random import string import time from time import sleep from typing import Any, Dict, List, Literal, Mapping, Optional import pytest from langchain.agents import AgentType, initialize_agent from langchain.chains import ( ConversationalRetrievalChain, ConversationChain, LLMChain, Retrie...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain.py
test_callback_generated_from_trace_chat
assert
numeric_literal
78
import os import random import string import time from time import sleep from typing import Any, Dict, List, Literal, Mapping, Optional import pytest from langchain.agents import AgentType, initialize_agent from langchain.chains import ( ConversationalRetrievalChain, ConversationChain, LLMChain, Retrie...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain.py
test_callback_generated_from_span_chain
assert
numeric_literal
76
import os import random import string import time from time import sleep from typing import Any, Dict, List, Literal, Mapping, Optional import pytest from langchain.agents import AgentType, initialize_agent from langchain.chains import ( ConversationalRetrievalChain, ConversationChain, LLMChain, Retrie...
3
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain_integration.py
test_stream_chat_models
assert
numeric_literal
38
from langchain_openai import ChatOpenAI, OpenAI from langchain.prompts import ChatPromptTemplate, PromptTemplate from langchain.schema import StrOutputParser import pytest import types from langfuse.callback import CallbackHandler from tests.utils import get_api from .utils import create_uuid def _is_streaming_respons...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_langchain_integration.py
test_stream_chat_models
assert
numeric_literal
42
from langchain_openai import ChatOpenAI, OpenAI from langchain.prompts import ChatPromptTemplate, PromptTemplate from langchain.schema import StrOutputParser import pytest import types from langfuse.callback import CallbackHandler from tests.utils import get_api from .utils import create_uuid def _is_streaming_respons...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index.py
test_callback_from_index_construction
assert
numeric_literal
59
import pytest from llama_index.core import PromptTemplate, Settings from llama_index.core.callbacks import CallbackManager from llama_index.core.query_pipeline import QueryPipeline from llama_index.llms.anthropic import Anthropic from llama_index.llms.openai import OpenAI from langfuse.client import Langfuse from lang...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index.py
test_callback_from_query_engine
assert
numeric_literal
52
import pytest from llama_index.core import PromptTemplate, Settings from llama_index.core.callbacks import CallbackManager from llama_index.core.query_pipeline import QueryPipeline from llama_index.llms.anthropic import Anthropic from llama_index.llms.openai import OpenAI from langfuse.client import Langfuse from lang...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index.py
test_callback_from_chat_engine
assert
numeric_literal
56
import pytest from llama_index.core import PromptTemplate, Settings from llama_index.core.callbacks import CallbackManager from llama_index.core.query_pipeline import QueryPipeline from llama_index.llms.anthropic import Anthropic from llama_index.llms.openai import OpenAI from langfuse.client import Langfuse from lang...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index.py
test_callback_with_root_trace
assert
numeric_literal
78
import pytest from llama_index.core import PromptTemplate, Settings from llama_index.core.callbacks import CallbackManager from llama_index.core.query_pipeline import QueryPipeline from llama_index.llms.anthropic import Anthropic from llama_index.llms.openai import OpenAI from langfuse.client import Langfuse from lang...
4
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index.py
test_callback_init
assert
none_literal
47
import pytest from llama_index.core import PromptTemplate, Settings from llama_index.core.callbacks import CallbackManager from llama_index.core.query_pipeline import QueryPipeline from llama_index.llms.anthropic import Anthropic from llama_index.llms.openai import OpenAI from langfuse.client import Langfuse from lang...
None
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_from_index_construction
assert
numeric_literal
66
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_from_query_engine
assert
numeric_literal
73
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
3
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_from_chat_engine
assert
numeric_literal
70
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_with_root_trace
assert
numeric_literal
69
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_from_index_construction
assert
none_literal
55
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
None
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_with_custom_trace_metadata
assert
variable
68
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
initial_name
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_with_custom_trace_metadata
assert
variable
71
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
initial_tags
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_with_custom_trace_metadata
assert
variable
69
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
initial_user_id
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_llama_index_instrumentation.py
test_instrumentor_with_custom_trace_metadata
assert
variable
70
from typing import Optional from langfuse.client import Langfuse from langfuse.llama_index import LlamaIndexInstrumentor from llama_index.llms import openai, anthropic from llama_index.core.prompts import PromptTemplate from llama_index.core.query_pipeline import QueryPipeline from tests.utils import get_api, get_llam...
initial_session_id
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_logger.py
test_via_env
assert
numeric_literal
12
import os from langfuse import Langfuse from langfuse.callback import CallbackHandler def test_via_env(): os.environ["LANGFUSE_DEBUG"] = "True" langfuse = Langfuse() assert langfuse.log.level ==
10
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_logger.py
test_default_langfuse
assert
numeric_literal
9
import os from langfuse import Langfuse from langfuse.callback import CallbackHandler def test_default_langfuse(): langfuse = Langfuse() assert langfuse.log.level ==
30
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_init_with_base64_data_uri
assert
none_literal
21
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
None
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_file_handling
assert
string_literal
21
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
"file"
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_init_with_content_bytes
assert
string_literal
19
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
"bytes"
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_reference_string
assert
variable
26
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
reference
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_parse_reference_string
assert
string_literal
21
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
"test-id"
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_media.py
test_parse_invalid_reference_string
pytest.raises
variable
18
import base64 import re from uuid import uuid4 import pytest from langfuse.client import Langfuse from langfuse.media import LangfuseMedia from tests.utils import get_api SAMPLE_JPEG_BYTES = b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" SAMPLE_BASE64_DATA_URI = ( "data:image/jpeg;base64,/9j/4...
ValueError)
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_openai.py
test_openai_chat_completion
assert
numeric_literal
51
import os import pytest from openai import APIConnectionError from openai.types.chat.chat_completion_message import ChatCompletionMessage from pydantic import BaseModel from langfuse.client import Langfuse from langfuse.openai import ( AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, _is_openai_v1, ope...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_openai.py
test_openai_chat_completion_stream
assert
numeric_literal
76
import os import pytest from openai import APIConnectionError from openai.types.chat.chat_completion_message import ChatCompletionMessage from pydantic import BaseModel from langfuse.client import Langfuse from langfuse.openai import ( AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, _is_openai_v1, ope...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_prompt.py
test_create_chat_prompt
assert
numeric_literal
36
from time import sleep import pytest from unittest.mock import Mock, patch import openai from langfuse.client import Langfuse from langfuse.prompt_cache import PromptCacheItem, DEFAULT_PROMPT_CACHE_TTL_SECONDS from tests.utils import create_uuid, get_api from langfuse.api.resources.prompts import Prompt_Text, Prompt_C...
0
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_prompt.py
test_get_prompt_by_version_or_label
assert
numeric_literal
25
from time import sleep import pytest from unittest.mock import Mock, patch import openai from langfuse.client import Langfuse from langfuse.prompt_cache import PromptCacheItem, DEFAULT_PROMPT_CACHE_TTL_SECONDS from tests.utils import create_uuid, get_api from langfuse.api.resources.prompts import Prompt_Text, Prompt_C...
2
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_prompt.py
test_get_prompt_by_version_or_label
assert
numeric_literal
30
from time import sleep import pytest from unittest.mock import Mock, patch import openai from langfuse.client import Langfuse from langfuse.prompt_cache import PromptCacheItem, DEFAULT_PROMPT_CACHE_TTL_SECONDS from tests.utils import create_uuid, get_api from langfuse.api.resources.prompts import Prompt_Text, Prompt_C...
1
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor
langfuse/langfuse-python
6c74dc37ad52770000edaa7f94035eacaddca023
267
train
train
tests/test_prompt.py
test_get_prompt_by_version_or_label
assert
numeric_literal
40
from time import sleep import pytest from unittest.mock import Mock, patch import openai from langfuse.client import Langfuse from langfuse.prompt_cache import PromptCacheItem, DEFAULT_PROMPT_CACHE_TTL_SECONDS from tests.utils import create_uuid, get_api from langfuse.api.resources.prompts import Prompt_Text, Prompt_C...
3
6c74dc37ad52770000edaa7f94035eacaddca023
267
v2_extractor_at_anchor