Skip to content

Commit 941b21e

Browse files
committed
move folders
1 parent 4de4d9e commit 941b21e

File tree

12 files changed

+7
-19
lines changed

12 files changed

+7
-19
lines changed

eval_protocol/types/remote_rollout_processor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class StatusResponse(BaseModel):
3131
"""Response model for GET /status endpoint."""
3232

3333
terminated: bool
34+
info: Optional[Dict[str, Any]] = None
3435

3536

3637
def create_langfuse_config_tags(init_request: InitRequest) -> List[str]:
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@
1919

2020
_STATE: Dict[str, Dict[str, Any]] = {}
2121

22-
ALLOWED_MESSAGE_FIELDS = {"role", "content", "tool_calls", "tool_call_id", "name"}
23-
24-
25-
def _clean_messages_for_api(messages: List[Message]) -> list[dict]:
26-
cleaned: list[dict] = []
27-
for msg in messages:
28-
msg_dict = msg.model_dump()
29-
cm = {k: v for k, v in msg_dict.items() if k in ALLOWED_MESSAGE_FIELDS and v is not None}
30-
# Some providers dislike empty content on assistant messages; keep if present
31-
cleaned.append(cm)
32-
return cleaned
33-
3422

3523
@app.post("/init")
3624
def init(req: InitRequest):
@@ -44,7 +32,7 @@ def _worker():
4432

4533
completion_kwargs = {
4634
"model": req.model,
47-
"messages": _clean_messages_for_api(req.messages),
35+
"messages": req.messages,
4836
"metadata": metadata,
4937
}
5038

tests/chinook/langfuse/test_remote_langfuse_chinook.py renamed to tests/remote_server/test_remote_langfuse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MANUAL SERVER STARTUP REQUIRED:
22
# Before running this test, start the remote server manually:
33
# cd /Users/derekxu/Documents/code/python-sdk
4-
# python -m tests.chinook.langfuse.remote_server
4+
# python -m tests.remote_server.remote_server
55
#
66
# The server should be running on http://127.0.0.1:7077
77

@@ -64,7 +64,7 @@ def rows() -> List[EvaluationRow]:
6464
async def test_remote_rollout_and_fetch_langfuse(row: EvaluationRow) -> EvaluationRow:
6565
"""
6666
End-to-end test:
67-
- REQUIRES MANUAL SERVER STARTUP: python -m tests.chinook.langfuse.remote_server
67+
- REQUIRES MANUAL SERVER STARTUP: python -m tests.remote_server.remote_server
6868
- trigger remote rollout via RemoteRolloutProcessor (calls init/status)
6969
- fetch traces from Langfuse filtered by metadata via output_data_loader; FAIL if none found
7070
"""

tests/chinook/langfuse/test_remote_langfuse_chinook_typescript.py renamed to tests/remote_server/test_remote_langfuse_typescript.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
from typing import List
3-
import atexit
43

54
import pytest
65

File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/chinook/langfuse/typescript-server/instrumentation.ts renamed to tests/remote_server/typescript-server/instrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NodeSDK } from "@opentelemetry/sdk-node";
22
import { LangfuseSpanProcessor } from "@langfuse/otel";
3-
import "./env";
3+
import "./env.js";
44

55
const sdk = new NodeSDK({
66
spanProcessors: [
File renamed without changes.

tests/chinook/langfuse/typescript-server/pnpm-lock.yaml renamed to tests/remote_server/typescript-server/pnpm-lock.yaml

File renamed without changes.

0 commit comments

Comments
 (0)