refactor(telemetry): export all from xsai

This commit is contained in:
藍+85CD committed 2025-09-04 14:14:01 +08:00
1 parent ec31d3940a
commit f76663cb24
3 files changed
+11

No files matched your search

+3
View File
@@ -1,2 +1,5 @@
export { generateText } from './utils/generate-text'
export { streamText } from './utils/stream-text'
export type * from 'xsai'
export * from 'xsai'
@@ -8,6 +8,10 @@ import { recordSpan } from './record-span'
import { stringifyTool } from './stringify-tool'
import { wrapTool } from './wrap-tool'
/**
* @experimental
* Generating Text with Telemetry.
*/
export const generateText = async (options: GenerateTextOptions) => {
const tracer = getTracer()
@@ -9,6 +9,10 @@ import { DelayedPromise, transformChunk } from './stream-text-internal'
import { stringifyTool } from './stringify-tool'
import { wrapTool } from './wrap-tool'
/**
* @experimental
* Streaming Text with Telemetry.
*/
export const streamText = (options: StreamTextOptions) => {
const tracer = getTracer()