Skip to content

Commit bf6196f

Browse files
author
Andrei Bratu
committed
changed name of prompt context
1 parent ee10e5a commit bf6196f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/humanloop/context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from humanloop.otel.constants import (
77
HUMANLOOP_CONTEXT_EVALUATION,
8-
HUMANLOOP_CONTEXT_PROMPT_PATH,
8+
HUMANLOOP_CONTEXT_PROMPT,
99
HUMANLOOP_CONTEXT_TRACE_ID,
1010
)
1111

@@ -34,7 +34,7 @@ class PromptContext:
3434

3535

3636
def set_prompt_context(prompt_context: PromptContext) -> ResetToken:
37-
key = hash((HUMANLOOP_CONTEXT_PROMPT_PATH, threading.get_ident()))
37+
key = hash((HUMANLOOP_CONTEXT_PROMPT, threading.get_ident()))
3838
return context_api.attach(
3939
context_api.set_value(
4040
key=key,
@@ -48,7 +48,7 @@ def reset_prompt_context(token: ResetToken):
4848

4949

5050
def get_prompt_context() -> Optional[PromptContext]:
51-
key = hash((HUMANLOOP_CONTEXT_PROMPT_PATH, threading.get_ident()))
51+
key = hash((HUMANLOOP_CONTEXT_PROMPT, threading.get_ident()))
5252
return context_api.get_value(key)
5353

5454

src/humanloop/otel/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
HUMANLOOP_FILE_TYPE_KEY = "humanloop.file.type"
77
HUMANLOOP_PATH_KEY = "humanloop.file.path"
88
# Opentelemetry context
9-
HUMANLOOP_CONTEXT_PROMPT_PATH = "humanloop.context.prompt.path"
9+
HUMANLOOP_CONTEXT_PROMPT = "humanloop.context.prompt"
1010
HUMANLOOP_CONTEXT_TRACE_ID = "humanloop.context.flow.trace_id"
1111
HUMANLOOP_CONTEXT_EVALUATION = "humanloop.context.evaluation"

0 commit comments

Comments
 (0)