Skip to content

Commit abb1484

Browse files
committed
revert integtests
1 parent bb5c0c6 commit abb1484

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5033
-83
lines changed

integ-tests/baml_src/clients.baml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ client<llm> Vertex {
181181
options {
182182
model gemini-2.5-flash
183183
location us-central1
184-
// credentials env.INTEG_TESTS_GOOGLE_APPLICATION_CREDENTIALS_CONTENT
184+
credentials env.INTEG_TESTS_GOOGLE_APPLICATION_CREDENTIALS_CONTENT
185185
}
186186
}
187187

@@ -191,7 +191,7 @@ client<llm> VertexClaude {
191191
model "claude-3-5-sonnet@20240620"
192192
location us-east5
193193
anthropic_version "vertex-2023-10-16"
194-
//credentials env.INTEG_TESTS_GOOGLE_APPLICATION_CREDENTIALS_CONTENT
194+
credentials env.INTEG_TESTS_GOOGLE_APPLICATION_CREDENTIALS_CONTENT
195195
}
196196
}
197197

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
generator lang_python {
22
output_type python/pydantic
33
output_dir "../python"
4-
version "0.207.0"
4+
version "0.207.1"
55
}
66

77
generator lang_python_v1 {
88
output_type python/pydantic/v1
99
output_dir "../python-v1"
10-
version "0.207.0"
10+
version "0.207.1"
1111
}
1212

1313
generator lang_typescript {
1414
output_type typescript
1515
output_dir "../typescript"
16-
version "0.207.0"
16+
version "0.207.1"
1717
}
1818

1919

2020
generator lang_typescript_esm {
2121
output_type typescript
2222
output_dir "../typescript-esm"
23-
version "0.207.0"
23+
version "0.207.1"
2424
module_format esm
2525
}
2626

2727

2828
generator lang_typescript_react {
2929
output_type typescript/react
3030
output_dir "../react"
31-
version "0.207.0"
31+
version "0.207.1"
3232
}
3333

3434
generator lang_ruby {
3535
output_type ruby/sorbet
3636
output_dir "../ruby"
37-
version "0.207.0"
37+
version "0.207.1"
3838
}
3939

4040
generator openapi {
4141
output_type rest/openapi
4242
output_dir "../openapi"
43-
version "0.207.0"
43+
version "0.207.1"
4444
on_generate "rm .gitignore"
4545
}
4646

4747
generator lang_go {
4848
output_type go
4949
output_dir "../go"
50-
version "0.207.0"
50+
version "0.207.1"
5151
client_package_name "example.com/integ-tests"
5252
on_generate "gofmt -w . && goimports -w . && go mod tidy"
5353
}

integ-tests/baml_src/test-files/providers/openai.baml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function TestOpenAI(input: string) -> string {
3333
client GPT4
3434
prompt #"
3535
{{ _.role("user") }}
36-
Write a nice haiku, ppgiven the user input. Make sure to reference the input in the haiku. Make it 50 paragraphs
36+
Write a nice haiku, given the user input. Make sure to reference the input in the haiku. Make it 50 paragraphs
3737

3838
Input: {{ input }}
3939
"#

integ-tests/baml_src/test-files/providers/vertex.baml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function TestVertex(input: string) -> string {
88
function TestVertexWithSystemInstructions() -> string {
99
client Vertex
1010
prompt #"{{_.role("system")}} You are a helpful assistant
11-
{{_.role("user")}} Write a poem about llamas. Keep it to 15 words or less.
11+
{{_.role("user")}} Write a poem about llamas. Keep it to 15 words or less.
1212
"#
1313
}
1414

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
// --------------------------------
2+
// Pure Expression Functions.
3+
// --------------------------------
4+
5+
function ReturnOne() -> int {
6+
1
7+
}
8+
9+
function ReturnNumber(n: int) -> int {
10+
n
11+
}
12+
13+
function CallReturnOne() -> int {
14+
ReturnOne()
15+
}
16+
17+
function ChainedCalls() -> int {
18+
ReturnNumber(CallReturnOne())
19+
}
20+
21+
function StoreFnCallInLocalVar(n: int) -> int {
22+
let result = ReturnNumber(n);
23+
24+
result
25+
}
26+
27+
function BoolToIntWithIfElse(b: bool) -> int {
28+
if (b) { 1 } else { 0 }
29+
}
30+
31+
function ReturnElseIfExpr(a: bool, b: bool) -> int {
32+
if (a) {
33+
1
34+
} else if (b) {
35+
2
36+
} else {
37+
3
38+
}
39+
}
40+
41+
function AssignElseIfExpr(a: bool, b: bool) -> int {
42+
let result = if (a) {
43+
1
44+
} else if (b) {
45+
2
46+
} else {
47+
3
48+
};
49+
50+
result
51+
}
52+
53+
function NormalElseIfStmt(a: bool, b: bool) -> int {
54+
let v = 0;
55+
56+
if (a) {
57+
let one = 1;
58+
StoreFnCallInLocalVar(one);
59+
} else if (b) {
60+
let two = 2;
61+
StoreFnCallInLocalVar(two);
62+
} else {
63+
let three = 3;
64+
StoreFnCallInLocalVar(three);
65+
}
66+
67+
v
68+
}
69+
70+
function IterativeFibonacci(n: int) -> int {
71+
let a = 0;
72+
let b = 1;
73+
74+
if (n == 0) {
75+
b
76+
} else {
77+
let i = 1;
78+
while (i <= n) {
79+
let c = a + b;
80+
a = b;
81+
b = c;
82+
i += 1;
83+
}
84+
a
85+
}
86+
}
87+
88+
function SumArray(arr: int[]) -> int {
89+
let sum = 0;
90+
for (a in arr) {
91+
sum += a;
92+
}
93+
sum
94+
}
95+
96+
function SumFromTo(x: int, y: int) -> int {
97+
let s = 0;
98+
99+
for (let i = x; i <= y; i += 1) {
100+
s += i;
101+
}
102+
103+
s
104+
}
105+
106+
function ReturnCategory(category: Category) -> Category {
107+
category
108+
}
109+
110+
function ReturnImageFromUrl(url: string) -> image {
111+
image.from_url(url)
112+
}
113+
114+
// --------------------------------
115+
// Expression Functions with LLM calls.
116+
// --------------------------------
117+
118+
function CallLlmDescribeImage(img: image) -> string {
119+
DescribeImage(img)
120+
}
121+
122+
function LlmReturnNumber(n: int) -> int {
123+
client GPT35LegacyProvider // GPT 3.5 Turbo
124+
prompt #"
125+
Return the number {{ n }} without any additional text.
126+
"#
127+
}
128+
129+
function ReturnNumberCallingLlm(n: int) -> int {
130+
LlmReturnNumber(n)
131+
}
132+
133+
function StoreLlmCallInLocalVar(n: int) -> int {
134+
let result = LlmReturnNumber(n);
135+
136+
result
137+
}
138+
139+
function BoolToIntWithIfElseCallingLlm(b: bool) -> int {
140+
if (b) { LlmReturnNumber(1) } else { LlmReturnNumber(0) }
141+
}

integ-tests/go/baml_client/baml_source_map.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integ-tests/go/baml_client/functions.go

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integ-tests/go/baml_client/functions_parse.go

Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)