|
318 | 318 | "id": "<span:14>", |
319 | 319 | "log_id": "g", |
320 | 320 | "metadata": { |
321 | | - "operation": "text-generation-stream", |
| 321 | + "operation": "chat-stream-tool-call", |
322 | 322 | "testRunId": "<run:1>" |
323 | 323 | }, |
324 | 324 | "metrics": { |
|
328 | 328 | "root_span_id": "<span:2>", |
329 | 329 | "span_attributes": { |
330 | 330 | "exec_counter": 5, |
331 | | - "name": "huggingface-text-generation-stream-operation" |
| 331 | + "name": "huggingface-chat-stream-tool-call-operation" |
332 | 332 | }, |
333 | 333 | "span_id": "<span:15>", |
334 | 334 | "span_parents": [ |
|
353 | 353 | "context": {}, |
354 | 354 | "created": "<timestamp>", |
355 | 355 | "id": "<span:16>", |
356 | | - "input": "The capital of France is", |
| 356 | + "input": [ |
| 357 | + { |
| 358 | + "content": "What is the weather in San Francisco? Call the get_current_weather tool.", |
| 359 | + "role": "user" |
| 360 | + } |
| 361 | + ], |
357 | 362 | "log_id": "g", |
358 | 363 | "metadata": { |
359 | | - "endpointUrl": "https://router.huggingface.co/featherless-ai/v1/completions", |
360 | | - "max_tokens": 4, |
361 | | - "model": "arcee-ai/Trinity-Large-Thinking", |
362 | | - "provider": "huggingface" |
| 364 | + "endpointUrl": "https://router.huggingface.co", |
| 365 | + "max_tokens": 64, |
| 366 | + "model": "meta-llama/Llama-3.1-8B-Instruct", |
| 367 | + "provider": "featherless-ai", |
| 368 | + "temperature": 0, |
| 369 | + "tool_choice": "required", |
| 370 | + "tools": [ |
| 371 | + { |
| 372 | + "function": { |
| 373 | + "description": "Get the current weather for a location.", |
| 374 | + "name": "get_current_weather", |
| 375 | + "parameters": { |
| 376 | + "properties": { |
| 377 | + "location": { |
| 378 | + "description": "City and state or city and country.", |
| 379 | + "type": "string" |
| 380 | + } |
| 381 | + }, |
| 382 | + "required": [ |
| 383 | + "location" |
| 384 | + ], |
| 385 | + "type": "object" |
| 386 | + } |
| 387 | + }, |
| 388 | + "type": "function" |
| 389 | + } |
| 390 | + ] |
363 | 391 | }, |
364 | 392 | "metrics": { |
365 | 393 | "start": "<timestamp>" |
|
368 | 396 | "root_span_id": "<span:2>", |
369 | 397 | "span_attributes": { |
370 | 398 | "exec_counter": 6, |
371 | | - "name": "huggingface.text_generation_stream", |
| 399 | + "name": "huggingface.chat_completion_stream", |
372 | 400 | "type": "llm" |
373 | 401 | }, |
374 | 402 | "span_id": "<span:17>", |
|
381 | 409 | "id": "<span:16>", |
382 | 410 | "log_id": "g", |
383 | 411 | "metrics": { |
384 | | - "completion_tokens": 4, |
385 | | - "prompt_tokens": 6, |
| 412 | + "completion_accepted_prediction_tokens": 0, |
| 413 | + "completion_reasoning_tokens": 0, |
| 414 | + "completion_rejected_prediction_tokens": 0, |
| 415 | + "completion_tokens": 20, |
| 416 | + "prompt_cached_tokens": 384, |
| 417 | + "prompt_tokens": 394, |
386 | 418 | "time_to_first_token": "<number>", |
387 | | - "tokens": 10 |
| 419 | + "tokens": 414 |
388 | 420 | }, |
389 | 421 | "project_id": "<project_id>", |
390 | 422 | "root_span_id": "<span:2>", |
|
398 | 430 | "id": "<span:16>", |
399 | 431 | "log_id": "g", |
400 | 432 | "metadata": { |
401 | | - "finish_reason": "length" |
| 433 | + "created": 0, |
| 434 | + "id": "<span:19>", |
| 435 | + "model": "llama3.1-8b", |
| 436 | + "object": "chat.completion.chunk" |
402 | 437 | }, |
403 | 438 | "output": { |
404 | | - "finish_reason": "length", |
405 | | - "generated_text": "<string>" |
| 439 | + "choices": [ |
| 440 | + { |
| 441 | + "content": "<string>", |
| 442 | + "finish_reason": "tool_calls", |
| 443 | + "index": 0, |
| 444 | + "role": "assistant", |
| 445 | + "tool_calls": [ |
| 446 | + { |
| 447 | + "arguments": "<string>", |
| 448 | + "id": "<span:18>", |
| 449 | + "index": null, |
| 450 | + "name": "get_current_weather", |
| 451 | + "type": "function" |
| 452 | + } |
| 453 | + ] |
| 454 | + } |
| 455 | + ] |
406 | 456 | }, |
407 | 457 | "project_id": "<project_id>", |
408 | 458 | "root_span_id": "<span:2>", |
|
433 | 483 | "caller_lineno": 0 |
434 | 484 | }, |
435 | 485 | "created": "<timestamp>", |
436 | | - "id": "<span:18>", |
| 486 | + "id": "<span:20>", |
437 | 487 | "log_id": "g", |
438 | 488 | "metadata": { |
439 | | - "operation": "feature-extraction", |
| 489 | + "operation": "text-generation-stream", |
440 | 490 | "testRunId": "<run:1>" |
441 | 491 | }, |
442 | 492 | "metrics": { |
|
446 | 496 | "root_span_id": "<span:2>", |
447 | 497 | "span_attributes": { |
448 | 498 | "exec_counter": 7, |
| 499 | + "name": "huggingface-text-generation-stream-operation" |
| 500 | + }, |
| 501 | + "span_id": "<span:21>", |
| 502 | + "span_parents": [ |
| 503 | + "<span:2>" |
| 504 | + ] |
| 505 | + }, |
| 506 | + { |
| 507 | + "_is_merge": true, |
| 508 | + "id": "<span:20>", |
| 509 | + "log_id": "g", |
| 510 | + "metrics": { |
| 511 | + "end": "<timestamp>" |
| 512 | + }, |
| 513 | + "project_id": "<project_id>", |
| 514 | + "root_span_id": "<span:2>", |
| 515 | + "span_id": "<span:21>", |
| 516 | + "span_parents": [ |
| 517 | + "<span:2>" |
| 518 | + ] |
| 519 | + }, |
| 520 | + { |
| 521 | + "context": {}, |
| 522 | + "created": "<timestamp>", |
| 523 | + "id": "<span:22>", |
| 524 | + "input": "The capital of France is", |
| 525 | + "log_id": "g", |
| 526 | + "metadata": { |
| 527 | + "endpointUrl": "https://router.huggingface.co/featherless-ai/v1/completions", |
| 528 | + "max_tokens": 4, |
| 529 | + "model": "arcee-ai/Trinity-Large-Thinking", |
| 530 | + "provider": "huggingface" |
| 531 | + }, |
| 532 | + "metrics": { |
| 533 | + "start": "<timestamp>" |
| 534 | + }, |
| 535 | + "project_id": "<project_id>", |
| 536 | + "root_span_id": "<span:2>", |
| 537 | + "span_attributes": { |
| 538 | + "exec_counter": 8, |
| 539 | + "name": "huggingface.text_generation_stream", |
| 540 | + "type": "llm" |
| 541 | + }, |
| 542 | + "span_id": "<span:23>", |
| 543 | + "span_parents": [ |
| 544 | + "<span:21>" |
| 545 | + ] |
| 546 | + }, |
| 547 | + { |
| 548 | + "_is_merge": true, |
| 549 | + "id": "<span:22>", |
| 550 | + "log_id": "g", |
| 551 | + "metrics": { |
| 552 | + "completion_tokens": 4, |
| 553 | + "prompt_tokens": 6, |
| 554 | + "time_to_first_token": "<number>", |
| 555 | + "tokens": 10 |
| 556 | + }, |
| 557 | + "project_id": "<project_id>", |
| 558 | + "root_span_id": "<span:2>", |
| 559 | + "span_id": "<span:23>", |
| 560 | + "span_parents": [ |
| 561 | + "<span:21>" |
| 562 | + ] |
| 563 | + }, |
| 564 | + { |
| 565 | + "_is_merge": true, |
| 566 | + "id": "<span:22>", |
| 567 | + "log_id": "g", |
| 568 | + "metadata": { |
| 569 | + "finish_reason": "length" |
| 570 | + }, |
| 571 | + "output": { |
| 572 | + "finish_reason": "length", |
| 573 | + "generated_text": "<string>" |
| 574 | + }, |
| 575 | + "project_id": "<project_id>", |
| 576 | + "root_span_id": "<span:2>", |
| 577 | + "span_id": "<span:23>", |
| 578 | + "span_parents": [ |
| 579 | + "<span:21>" |
| 580 | + ] |
| 581 | + }, |
| 582 | + { |
| 583 | + "_is_merge": true, |
| 584 | + "id": "<span:22>", |
| 585 | + "log_id": "g", |
| 586 | + "metrics": { |
| 587 | + "end": "<timestamp>" |
| 588 | + }, |
| 589 | + "project_id": "<project_id>", |
| 590 | + "root_span_id": "<span:2>", |
| 591 | + "span_id": "<span:23>", |
| 592 | + "span_parents": [ |
| 593 | + "<span:21>" |
| 594 | + ] |
| 595 | + }, |
| 596 | + { |
| 597 | + "_is_merge": false, |
| 598 | + "context": { |
| 599 | + "caller_filename": "<repo>/e2e/helpers/provider-runtime.mjs", |
| 600 | + "caller_functionname": "runOperation", |
| 601 | + "caller_lineno": 0 |
| 602 | + }, |
| 603 | + "created": "<timestamp>", |
| 604 | + "id": "<span:24>", |
| 605 | + "log_id": "g", |
| 606 | + "metadata": { |
| 607 | + "operation": "feature-extraction", |
| 608 | + "testRunId": "<run:1>" |
| 609 | + }, |
| 610 | + "metrics": { |
| 611 | + "start": "<timestamp>" |
| 612 | + }, |
| 613 | + "project_id": "<project_id>", |
| 614 | + "root_span_id": "<span:2>", |
| 615 | + "span_attributes": { |
| 616 | + "exec_counter": 9, |
449 | 617 | "name": "huggingface-feature-extraction-operation" |
450 | 618 | }, |
451 | | - "span_id": "<span:19>", |
| 619 | + "span_id": "<span:25>", |
452 | 620 | "span_parents": [ |
453 | 621 | "<span:2>" |
454 | 622 | ] |
455 | 623 | }, |
456 | 624 | { |
457 | 625 | "_is_merge": true, |
458 | | - "id": "<span:18>", |
| 626 | + "id": "<span:24>", |
459 | 627 | "log_id": "g", |
460 | 628 | "metrics": { |
461 | 629 | "end": "<timestamp>" |
462 | 630 | }, |
463 | 631 | "project_id": "<project_id>", |
464 | 632 | "root_span_id": "<span:2>", |
465 | | - "span_id": "<span:19>", |
| 633 | + "span_id": "<span:25>", |
466 | 634 | "span_parents": [ |
467 | 635 | "<span:2>" |
468 | 636 | ] |
469 | 637 | }, |
470 | 638 | { |
471 | 639 | "context": {}, |
472 | 640 | "created": "<timestamp>", |
473 | | - "id": "<span:20>", |
| 641 | + "id": "<span:26>", |
474 | 642 | "input": "Paris France", |
475 | 643 | "log_id": "g", |
476 | 644 | "metadata": { |
|
484 | 652 | "project_id": "<project_id>", |
485 | 653 | "root_span_id": "<span:2>", |
486 | 654 | "span_attributes": { |
487 | | - "exec_counter": 8, |
| 655 | + "exec_counter": 10, |
488 | 656 | "name": "huggingface.feature_extraction", |
489 | 657 | "type": "llm" |
490 | 658 | }, |
491 | | - "span_id": "<span:21>", |
| 659 | + "span_id": "<span:27>", |
492 | 660 | "span_parents": [ |
493 | | - "<span:19>" |
| 661 | + "<span:25>" |
494 | 662 | ] |
495 | 663 | }, |
496 | 664 | { |
497 | 665 | "_is_merge": true, |
498 | | - "id": "<span:20>", |
| 666 | + "id": "<span:26>", |
499 | 667 | "log_id": "g", |
500 | 668 | "metrics": {}, |
501 | 669 | "output": { |
502 | 670 | "embedding_length": 1024 |
503 | 671 | }, |
504 | 672 | "project_id": "<project_id>", |
505 | 673 | "root_span_id": "<span:2>", |
506 | | - "span_id": "<span:21>", |
| 674 | + "span_id": "<span:27>", |
507 | 675 | "span_parents": [ |
508 | | - "<span:19>" |
| 676 | + "<span:25>" |
509 | 677 | ] |
510 | 678 | }, |
511 | 679 | { |
512 | 680 | "_is_merge": true, |
513 | | - "id": "<span:20>", |
| 681 | + "id": "<span:26>", |
514 | 682 | "log_id": "g", |
515 | 683 | "metrics": { |
516 | 684 | "end": "<timestamp>" |
517 | 685 | }, |
518 | 686 | "project_id": "<project_id>", |
519 | 687 | "root_span_id": "<span:2>", |
520 | | - "span_id": "<span:21>", |
| 688 | + "span_id": "<span:27>", |
521 | 689 | "span_parents": [ |
522 | | - "<span:19>" |
| 690 | + "<span:25>" |
523 | 691 | ] |
524 | 692 | } |
525 | 693 | ] |
0 commit comments