Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions py/src/braintrust/wrappers/cassettes/test_embed_content.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
interactions:
- request:
body: '{"requests": [{"content": {"parts": [{"text": "This is a test"}], "role":
"user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality": 32, "model":
"models/text-embedding-004"}, {"content": {"parts": [{"text": "This is another
test"}], "role": "user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality":
32, "model": "models/text-embedding-004"}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '360'
Content-Type:
- application/json
Host:
- generativelanguage.googleapis.com
user-agent:
- google-genai-sdk/1.66.0 gl-python/3.13.3
x-goog-api-client:
- google-genai-sdk/1.66.0 gl-python/3.13.3
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:batchEmbedContents
response:
body:
string: !!binary |
H4sIAAAAAAAC/01Pu4oCQRDM9yuKidVbYSMz8TgQ7tTAi2X2ptWB2WmZ7l0E8d+vdQ1MGupBVdet
AhyVwsUtcDNg8I8DGWrqZjISHYn404NznWlJPpSuOqWupRBiPk3rukEUZFYcuc/BbsFyt8ZARSJn
DPOW1E9g9Msn/eXCRWn0PqNWnJWyzrDyKeE7iv4826AMIYKeCclY8BF+8DH5NhHGj+Ct1QyxvCV3
pGcOMnOvHaJee3nM2Gz3h6/t7+bTmXKv7tU/iyzygQgBAAA=
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Encoding:
- gzip
Content-Type:
- application/json; charset=UTF-8
Date:
- Fri, 20 Mar 2026 17:24:34 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=59
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- '0'
status:
code: 404
message: Not Found
- request:
body: '{"requests": [{"content": {"parts": [{"text": "This is a test"}], "role":
"user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality": 32, "model":
"models/gemini-embedding-001"}, {"content": {"parts": [{"text": "This is another
test"}], "role": "user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality":
32, "model": "models/gemini-embedding-001"}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '364'
Content-Type:
- application/json
Host:
- generativelanguage.googleapis.com
user-agent:
- google-genai-sdk/1.66.0 gl-python/3.13.3
x-goog-api-client:
- google-genai-sdk/1.66.0 gl-python/3.13.3
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:batchEmbedContents
response:
body:
string: !!binary |
H4sIAAAAAAAC/41Uy24TQRC8+ytWOduo3w9+BeUAioWQgAuCS5R/T60VBU8vB/Zgr2p6q7urq+f5
tG0P1x9frk9P335+/fXwcfsEZNueb784+/P5++/rX3x/LvSBRFU8us7vKECyiLBSX1Bmt7TM80LQ
ns0sK0hsGZLeKy1V7RwzWNhdsgcxk0iZDQpnAY2OWCRMUcPBwE2lcDiYucHCszh1d/M+UDBlcOp9
NAd1NK+qsZjIAt6+DyWweqzZsivUD0qYq5MNNMMr6p7h8jakVAmdzWW5Ua6ldahGHdKVOEXaWhoq
qDIfsaUdaG8JFY22nDZRQ3Oso4Bs+sfkLahSpmT4XEhi0LKxar9hj7f/l/P/mRwuVc61TmKHDXhN
EsisQ+hObqqpvieL1zQtNTub2kgV7uGH1WHo3DF96GIKnuMySBYNXoSW6EFWeEV7dSxqaIFrLSYx
U4+5QphWaL1KYwJpDqsEBEMZZZk2fDENy74Xa3O/oG33fWOxd1C4lq4Xmi6E33bTrS4krIHbFAGj
RG09zd1Omof7w1xcRsfYLSjs42ps3a28rhdGE5bHYtEy9ZzkHpxsw9x4nHM192l/ezm9AuHl5j/b
BQAA
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Encoding:
- gzip
Content-Type:
- application/json; charset=UTF-8
Date:
- Fri, 20 Mar 2026 17:28:26 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=145
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- '0'
status:
code: 200
message: OK
version: 1
110 changes: 110 additions & 0 deletions py/src/braintrust/wrappers/cassettes/test_embed_content_async.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
interactions:
- request:
body: '{"requests": [{"content": {"parts": [{"text": "This is a test"}], "role":
"user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality": 32, "model":
"models/text-embedding-004"}, {"content": {"parts": [{"text": "This is another
test"}], "role": "user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality":
32, "model": "models/text-embedding-004"}]}'
headers:
Content-Type:
- application/json
user-agent:
- google-genai-sdk/1.66.0 gl-python/3.13.3
x-goog-api-client:
- google-genai-sdk/1.66.0 gl-python/3.13.3
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:batchEmbedContents
response:
body:
string: "{\n \"error\": {\n \"code\": 404,\n \"message\": \"models/text-embedding-004
is not found for API version v1beta, or is not supported for embedContent.
Call ListModels to see the list of available models and their supported methods.\",\n
\ \"status\": \"NOT_FOUND\"\n }\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Fri, 20 Mar 2026 17:24:34 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=61
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- '0'
status:
code: 404
message: Not Found
- request:
body: '{"requests": [{"content": {"parts": [{"text": "This is a test"}], "role":
"user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality": 32, "model":
"models/gemini-embedding-001"}, {"content": {"parts": [{"text": "This is another
test"}], "role": "user"}, "taskType": "RETRIEVAL_DOCUMENT", "outputDimensionality":
32, "model": "models/gemini-embedding-001"}]}'
headers:
Content-Type:
- application/json
user-agent:
- google-genai-sdk/1.66.0 gl-python/3.13.3
x-goog-api-client:
- google-genai-sdk/1.66.0 gl-python/3.13.3
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:batchEmbedContents
response:
body:
string: "{\n \"embeddings\": [\n {\n \"values\": [\n -0.023325698,\n
\ 0.0046664835,\n 0.011547477,\n -0.09579112,\n -0.0014762759,\n
\ 0.0008815472,\n -0.0021552797,\n -0.010228449,\n 0.0051200837,\n
\ -0.00017234083,\n -0.004328001,\n -0.011912019,\n 0.00035554593,\n
\ -0.0041076173,\n 0.16096918,\n 0.012422918,\n -0.0063045956,\n
\ 0.007986352,\n -0.002453504,\n -0.0076586856,\n -0.0046673263,\n
\ -0.011785407,\n 0.019633682,\n -0.0028250674,\n 0.003508845,\n
\ -0.008396229,\n 0.023694735,\n 0.013479813,\n 0.019790472,\n
\ -0.0024608728,\n -0.009812026,\n 0.013141339\n ]\n
\ },\n {\n \"values\": [\n -0.020953175,\n 0.00159121,\n
\ 0.01681236,\n -0.09719086,\n -0.0057125897,\n -0.0091514345,\n
\ 0.0065565477,\n -0.010889619,\n 0.005243009,\n -0.0102227805,\n
\ 0.0024382372,\n -0.008563973,\n 0.0069260946,\n -0.010109229,\n
\ 0.15993133,\n 0.014212301,\n -0.013013395,\n 0.0043994756,\n
\ -0.015382343,\n -0.009089905,\n 6.0088325e-05,\n -0.006942369,\n
\ 0.020732542,\n -0.0068101394,\n 0.0039503737,\n -0.004525233,\n
\ 0.032600258,\n 0.009397907,\n 0.022764705,\n -0.006015099,\n
\ -0.012276714,\n 0.013333517\n ]\n }\n ]\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Fri, 20 Mar 2026 17:28:26 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=142
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- '0'
status:
code: 200
message: OK
version: 1
Loading
Loading