@ai-sdk/azure 3.0.14 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -3
- package/src/__fixtures__/azure-code-interpreter-tool.1.chunks.txt +341 -0
- package/src/__fixtures__/azure-code-interpreter-tool.1.json +90 -0
- package/src/__fixtures__/azure-image-generation-tool.1.chunks.txt +41 -0
- package/src/__fixtures__/azure-image-generation-tool.1.json +88 -0
- package/src/__fixtures__/azure-reasoning-encrypted-content.1.chunks.txt +167 -0
- package/src/__fixtures__/azure-reasoning-encrypted-content.1.json +114 -0
- package/src/__fixtures__/azure-web-search-preview-tool.1.chunks.txt +359 -0
- package/src/__fixtures__/azure-web-search-preview-tool.1.json +103 -0
- package/src/__fixtures__/openai-file-search-tool.1.chunks.txt +94 -0
- package/src/__fixtures__/openai-file-search-tool.1.json +89 -0
- package/src/__fixtures__/openai-file-search-tool.2.chunks.txt +93 -0
- package/src/__fixtures__/openai-file-search-tool.2.json +112 -0
- package/src/__snapshots__/azure-openai-provider.test.ts.snap +6910 -0
- package/src/azure-openai-provider-metadata.ts +12 -0
- package/src/azure-openai-provider.test.ts +1869 -0
- package/src/azure-openai-provider.ts +273 -0
- package/src/azure-openai-tools.ts +18 -0
- package/src/index.ts +15 -0
- package/src/version.ts +6 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "resp_0365d26c32c64c650068cabb02fea4819495862c2bc58440ad",
|
|
3
|
+
"object": "response",
|
|
4
|
+
"created_at": 1758116611,
|
|
5
|
+
"status": "completed",
|
|
6
|
+
"background": false,
|
|
7
|
+
"error": null,
|
|
8
|
+
"incomplete_details": null,
|
|
9
|
+
"instructions": null,
|
|
10
|
+
"max_output_tokens": null,
|
|
11
|
+
"max_tool_calls": null,
|
|
12
|
+
"model": "gpt-5-mini-2025-08-07",
|
|
13
|
+
"output": [
|
|
14
|
+
{
|
|
15
|
+
"id": "rs_0365d26c32c64c650068cabb03bcc48194bfbd973152bca8f6",
|
|
16
|
+
"type": "reasoning",
|
|
17
|
+
"summary": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "fs_0365d26c32c64c650068cabb04aa388194b53c59de50a3951e",
|
|
21
|
+
"type": "file_search_call",
|
|
22
|
+
"status": "completed",
|
|
23
|
+
"queries": [
|
|
24
|
+
"What is an embedding model according to this document?",
|
|
25
|
+
"What is an embedding model in the document?",
|
|
26
|
+
"definition of embedding model",
|
|
27
|
+
"embedding model explanation 'embedding model'"
|
|
28
|
+
],
|
|
29
|
+
"results": [
|
|
30
|
+
{
|
|
31
|
+
"attributes": {},
|
|
32
|
+
"file_id": "file-Ebzhf8H4DPGPr9pUhr7n7v",
|
|
33
|
+
"filename": "ai.pdf",
|
|
34
|
+
"score": 0.9311,
|
|
35
|
+
"text": "AI 1\n\nAI\nGenerative artificial intelligence refers to models that predict and generate \nvarious types of outputs (such as text, images, or audio) based on whatʼs \nstatistically likely, pulling from patterns theyʼve learned from their training data. \nFor example:\n\nGiven a photo, a generative model can generate a caption.\n\nGiven an audio file, a generative model can generate a transcription.\n\nGiven a text description, a generative model can generate an image.\n\nA large language model LLM is a subset of generative models focused \nprimarily on text. An LLM takes a sequence of words as input and aims to \npredict the most likely sequence to follow. It assigns probabilities to potential \nnext sequences and then selects one. The model continues to generate \nsequences until it meets a specified stopping criterion.\n\nLLMs learn by training on massive collections of written text, which means they \nwill be better suited to some use cases than others. For example, a model \ntrained on GitHub data would understand the probabilities of sequences in \nsource code particularly well.\n\nHowever, it's crucial to understand LLMs' limitations. When asked about less \nknown or absent information, like the birthday of a personal relative, LLMs \nmight \"hallucinate\" or make up information. It's essential to consider how well-\nrepresented the information you need is in the model.\n\nAn embedding model is used to convert complex data (like words or images) \ninto a dense vector (a list of numbers) representation, known as an embedding. \nUnlike generative models, embedding models do not generate new text or data. \nInstead, they provide representations of semantic and synactic relationships \nbetween entities that can be used as input for other models or other natural \nlanguage processing tasks.\n\nIn the next section, you will learn about the difference between models \nproviders and models, and which ones are available in the AI SDK."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "rs_0365d26c32c64c650068cabb061740819491324d349d0f07ca",
|
|
41
|
+
"type": "reasoning",
|
|
42
|
+
"summary": []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "msg_0365d26c32c64c650068cabb0e66b081949f66f61dacef39f3",
|
|
46
|
+
"type": "message",
|
|
47
|
+
"status": "completed",
|
|
48
|
+
"content": [
|
|
49
|
+
{
|
|
50
|
+
"type": "output_text",
|
|
51
|
+
"annotations": [
|
|
52
|
+
{
|
|
53
|
+
"type": "file_citation",
|
|
54
|
+
"file_id": "file-Ebzhf8H4DPGPr9pUhr7n7v",
|
|
55
|
+
"filename": "ai.pdf",
|
|
56
|
+
"index": 350
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"logprobs": [],
|
|
60
|
+
"text": "According to the document, an embedding model converts complex data (like words or images) into a dense vector — a list of numbers — called an embedding. It does not generate new text or data; instead it encodes semantic and syntactic relationships between entities so those vector representations can be used as inputs for other models or NLP tasks ."
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"role": "assistant"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"parallel_tool_calls": true,
|
|
67
|
+
"previous_response_id": null,
|
|
68
|
+
"prompt_cache_key": null,
|
|
69
|
+
"reasoning": {
|
|
70
|
+
"effort": "medium",
|
|
71
|
+
"summary": null
|
|
72
|
+
},
|
|
73
|
+
"safety_identifier": null,
|
|
74
|
+
"service_tier": "default",
|
|
75
|
+
"store": true,
|
|
76
|
+
"temperature": 1,
|
|
77
|
+
"text": {
|
|
78
|
+
"format": {
|
|
79
|
+
"type": "text"
|
|
80
|
+
},
|
|
81
|
+
"verbosity": "medium"
|
|
82
|
+
},
|
|
83
|
+
"tool_choice": "auto",
|
|
84
|
+
"tools": [
|
|
85
|
+
{
|
|
86
|
+
"type": "file_search",
|
|
87
|
+
"filters": null,
|
|
88
|
+
"max_num_results": 20,
|
|
89
|
+
"ranking_options": {
|
|
90
|
+
"ranker": "auto",
|
|
91
|
+
"score_threshold": 0
|
|
92
|
+
},
|
|
93
|
+
"vector_store_ids": ["vs_68caad8bd5d88191ab766cf043d89a18"]
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"top_logprobs": 0,
|
|
97
|
+
"top_p": 1,
|
|
98
|
+
"truncation": "disabled",
|
|
99
|
+
"usage": {
|
|
100
|
+
"input_tokens": 3678,
|
|
101
|
+
"input_tokens_details": {
|
|
102
|
+
"cached_tokens": 2304
|
|
103
|
+
},
|
|
104
|
+
"output_tokens": 536,
|
|
105
|
+
"output_tokens_details": {
|
|
106
|
+
"reasoning_tokens": 448
|
|
107
|
+
},
|
|
108
|
+
"total_tokens": 4214
|
|
109
|
+
},
|
|
110
|
+
"user": null,
|
|
111
|
+
"metadata": {}
|
|
112
|
+
}
|