Skip to content

Commit

Permalink
fix (ai/core): Revert "chore (core): strip internal properties from a…
Browse files Browse the repository at this point in the history
…uto-complete. (#4561)" (#4697)
  • Loading branch information
shaper authored Feb 4, 2025
1 parent 69ba497 commit 6a1acfe
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-mayflies-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'ai': patch
---

fix (ai/core): revert '@internal' tag on function definitions due to build impacts
2 changes: 1 addition & 1 deletion packages/ai/core/generate-image/generate-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Only applicable for HTTP-based providers.
headers?: Record<string, string>;

/**
* @internal For test use only. May change without notice.
* Internal. For test use only. May change without notice.
*/
_internal?: {
currentDate?: () => Date;
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/core/generate-object/generate-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ functionality that can be fully encapsulated in the provider.
experimental_providerMetadata?: ProviderMetadata;

/**
* @internal For test use only. May change without notice.
* Internal. For test use only. May change without notice.
*/
_internal?: {
generateId?: () => string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/core/generate-object/stream-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Callback that is called when the LLM response and the final object validation ar
onFinish?: OnFinishCallback<OBJECT>;

/**
* @internal For test use only. May change without notice.
* Internal. For test use only. May change without notice.
*/
_internal?: {
generateId?: () => string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/core/generate-text/generate-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ A function that attempts to repair a tool call that failed to parse.
onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;

/**
* @internal For test use only. May change without notice.
* Internal. For test use only. May change without notice.
*/
_internal?: {
generateId?: IDGenerator;
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/core/generate-text/smooth-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function smoothStream<TOOLS extends ToolSet>({
delayInMs?: number | null;
chunking?: 'word' | 'line' | RegExp;
/**
* @internal For test use only. May change without notice.
* Internal. For test use only. May change without notice.
*/
_internal?: {
delay?: (delayInMs: number | null) => Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/core/generate-text/stream-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Callback that is called when each step (LLM call) is finished, including interme
onStepFinish?: (event: StepResult<TOOLS>) => Promise<void> | void;

/**
@internal For test use only. May change without notice.
Internal. For test use only. May change without notice.
*/
_internal?: {
now?: () => number;
Expand Down
3 changes: 0 additions & 3 deletions packages/ai/core/util/simulate-readable-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export function simulateReadableStream<T>({
chunks: T[];
initialDelayInMs?: number | null;
chunkDelayInMs?: number | null;
/**
* @internal For test use only. May change without notice.
*/
_internal?: {
delay?: (ms: number | null) => Promise<void>;
};
Expand Down

0 comments on commit 6a1acfe

Please sign in to comment.