@biolm/biolm-models-mcp 0.2.0

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.
Files changed (153) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +95 -0
  3. package/auth.d.mts +6 -0
  4. package/auth.d.mts.map +1 -0
  5. package/auth.d.ts +6 -0
  6. package/auth.d.ts.map +1 -0
  7. package/auth.js +37 -0
  8. package/auth.js.map +1 -0
  9. package/auth.mjs +32 -0
  10. package/auth.mjs.map +1 -0
  11. package/code-tool-paths.cjs +8 -0
  12. package/code-tool-paths.cjs.map +1 -0
  13. package/code-tool-paths.d.cts +2 -0
  14. package/code-tool-paths.d.cts.map +1 -0
  15. package/code-tool-types.d.mts +14 -0
  16. package/code-tool-types.d.mts.map +1 -0
  17. package/code-tool-types.d.ts +14 -0
  18. package/code-tool-types.d.ts.map +1 -0
  19. package/code-tool-types.js +4 -0
  20. package/code-tool-types.js.map +1 -0
  21. package/code-tool-types.mjs +3 -0
  22. package/code-tool-types.mjs.map +1 -0
  23. package/code-tool-worker.d.mts +5 -0
  24. package/code-tool-worker.d.mts.map +1 -0
  25. package/code-tool-worker.d.ts +5 -0
  26. package/code-tool-worker.d.ts.map +1 -0
  27. package/code-tool-worker.js +286 -0
  28. package/code-tool-worker.js.map +1 -0
  29. package/code-tool-worker.mjs +248 -0
  30. package/code-tool-worker.mjs.map +1 -0
  31. package/code-tool.d.mts +21 -0
  32. package/code-tool.d.mts.map +1 -0
  33. package/code-tool.d.ts +21 -0
  34. package/code-tool.d.ts.map +1 -0
  35. package/code-tool.js +336 -0
  36. package/code-tool.js.map +1 -0
  37. package/code-tool.mjs +300 -0
  38. package/code-tool.mjs.map +1 -0
  39. package/docs-search-tool.d.mts +59 -0
  40. package/docs-search-tool.d.mts.map +1 -0
  41. package/docs-search-tool.d.ts +59 -0
  42. package/docs-search-tool.d.ts.map +1 -0
  43. package/docs-search-tool.js +104 -0
  44. package/docs-search-tool.js.map +1 -0
  45. package/docs-search-tool.mjs +99 -0
  46. package/docs-search-tool.mjs.map +1 -0
  47. package/http.d.mts +12 -0
  48. package/http.d.mts.map +1 -0
  49. package/http.d.ts +12 -0
  50. package/http.d.ts.map +1 -0
  51. package/http.js +224 -0
  52. package/http.js.map +1 -0
  53. package/http.mjs +216 -0
  54. package/http.mjs.map +1 -0
  55. package/index.d.mts +3 -0
  56. package/index.d.mts.map +1 -0
  57. package/index.d.ts +3 -0
  58. package/index.d.ts.map +1 -0
  59. package/index.js +60 -0
  60. package/index.js.map +1 -0
  61. package/index.mjs +58 -0
  62. package/index.mjs.map +1 -0
  63. package/instructions.d.mts +5 -0
  64. package/instructions.d.mts.map +1 -0
  65. package/instructions.d.ts +5 -0
  66. package/instructions.d.ts.map +1 -0
  67. package/instructions.js +62 -0
  68. package/instructions.js.map +1 -0
  69. package/instructions.mjs +56 -0
  70. package/instructions.mjs.map +1 -0
  71. package/local-docs-search.d.mts +28 -0
  72. package/local-docs-search.d.mts.map +1 -0
  73. package/local-docs-search.d.ts +28 -0
  74. package/local-docs-search.d.ts.map +1 -0
  75. package/local-docs-search.js +797 -0
  76. package/local-docs-search.js.map +1 -0
  77. package/local-docs-search.mjs +757 -0
  78. package/local-docs-search.mjs.map +1 -0
  79. package/logger.d.mts +7 -0
  80. package/logger.d.mts.map +1 -0
  81. package/logger.d.ts +7 -0
  82. package/logger.d.ts.map +1 -0
  83. package/logger.js +29 -0
  84. package/logger.js.map +1 -0
  85. package/logger.mjs +22 -0
  86. package/logger.mjs.map +1 -0
  87. package/methods.d.mts +10 -0
  88. package/methods.d.mts.map +1 -0
  89. package/methods.d.ts +10 -0
  90. package/methods.d.ts.map +1 -0
  91. package/methods.js +761 -0
  92. package/methods.js.map +1 -0
  93. package/methods.mjs +757 -0
  94. package/methods.mjs.map +1 -0
  95. package/options.d.mts +23 -0
  96. package/options.d.mts.map +1 -0
  97. package/options.d.ts +23 -0
  98. package/options.d.ts.map +1 -0
  99. package/options.js +141 -0
  100. package/options.js.map +1 -0
  101. package/options.mjs +134 -0
  102. package/options.mjs.map +1 -0
  103. package/package.json +236 -0
  104. package/server.d.mts +38 -0
  105. package/server.d.mts.map +1 -0
  106. package/server.d.ts +38 -0
  107. package/server.d.ts.map +1 -0
  108. package/server.js +170 -0
  109. package/server.js.map +1 -0
  110. package/server.mjs +160 -0
  111. package/server.mjs.map +1 -0
  112. package/src/auth.ts +42 -0
  113. package/src/code-tool-paths.cts +5 -0
  114. package/src/code-tool-types.ts +17 -0
  115. package/src/code-tool-worker.ts +299 -0
  116. package/src/code-tool.ts +390 -0
  117. package/src/docs-search-tool.ts +138 -0
  118. package/src/http.ts +266 -0
  119. package/src/index.ts +67 -0
  120. package/src/instructions.ts +84 -0
  121. package/src/local-docs-search.ts +901 -0
  122. package/src/logger.ts +28 -0
  123. package/src/methods.ts +782 -0
  124. package/src/options.ts +185 -0
  125. package/src/server.ts +210 -0
  126. package/src/stdio.ts +17 -0
  127. package/src/tsconfig.json +11 -0
  128. package/src/types.ts +126 -0
  129. package/src/util.ts +25 -0
  130. package/stdio.d.mts +3 -0
  131. package/stdio.d.mts.map +1 -0
  132. package/stdio.d.ts +3 -0
  133. package/stdio.d.ts.map +1 -0
  134. package/stdio.js +18 -0
  135. package/stdio.js.map +1 -0
  136. package/stdio.mjs +14 -0
  137. package/stdio.mjs.map +1 -0
  138. package/types.d.mts +65 -0
  139. package/types.d.mts.map +1 -0
  140. package/types.d.ts +65 -0
  141. package/types.d.ts.map +1 -0
  142. package/types.js +58 -0
  143. package/types.js.map +1 -0
  144. package/types.mjs +53 -0
  145. package/types.mjs.map +1 -0
  146. package/util.d.mts +4 -0
  147. package/util.d.mts.map +1 -0
  148. package/util.d.ts +4 -0
  149. package/util.d.ts.map +1 -0
  150. package/util.js +30 -0
  151. package/util.js.map +1 -0
  152. package/util.mjs +24 -0
  153. package/util.mjs.map +1 -0
@@ -0,0 +1,901 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import MiniSearch from 'minisearch';
4
+ import * as fs from 'node:fs/promises';
5
+ import * as path from 'node:path';
6
+ import { getLogger } from './logger';
7
+
8
+ type PerLanguageData = {
9
+ method?: string;
10
+ example?: string;
11
+ };
12
+
13
+ type MethodEntry = {
14
+ name: string;
15
+ endpoint: string;
16
+ httpMethod: string;
17
+ summary: string;
18
+ description: string;
19
+ stainlessPath: string;
20
+ qualified: string;
21
+ params?: string[];
22
+ response?: string;
23
+ markdown?: string;
24
+ perLanguage?: Record<string, PerLanguageData>;
25
+ };
26
+
27
+ type ProseChunk = {
28
+ content: string;
29
+ tag: string;
30
+ sectionContext?: string;
31
+ source?: string;
32
+ };
33
+
34
+ type MiniSearchDocument = {
35
+ id: string;
36
+ kind: 'http_method' | 'prose';
37
+ name?: string;
38
+ endpoint?: string;
39
+ summary?: string;
40
+ description?: string;
41
+ qualified?: string;
42
+ stainlessPath?: string;
43
+ content?: string;
44
+ sectionContext?: string;
45
+ _original: Record<string, unknown>;
46
+ };
47
+
48
+ type SearchResult = {
49
+ results: (string | Record<string, unknown>)[];
50
+ };
51
+
52
+ const EMBEDDED_METHODS: MethodEntry[] = [
53
+ {
54
+ name: 'predict',
55
+ endpoint: '/api/v3/ablang2/predict/',
56
+ httpMethod: 'post',
57
+ summary: 'AbLang-2 -> Predict',
58
+ description: 'AbLang-2 -> Predict',
59
+ stainlessPath: '(resource) v3.ablang2 > (method) predict',
60
+ qualified: 'client.v3.ablang2.predict',
61
+ params: ['body?: object;'],
62
+ markdown:
63
+ "## predict\n\n`client.v3.ablang2.predict(body?: object): void`\n\n**post** `/api/v3/ablang2/predict/`\n\nAbLang-2 -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.ablang2.predict()\n```",
64
+ perLanguage: {
65
+ typescript: {
66
+ method: 'client.v3.ablang2.predict',
67
+ example:
68
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.ablang2.predict();",
69
+ },
70
+ python: {
71
+ method: 'v3.ablang2.predict',
72
+ example:
73
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.ablang2.predict()',
74
+ },
75
+ http: {
76
+ example:
77
+ 'curl https://biolm.ai/api/v3/ablang2/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
78
+ },
79
+ },
80
+ },
81
+ {
82
+ name: 'predict',
83
+ endpoint: '/api/v3/abodybuilder3-language/predict/',
84
+ httpMethod: 'post',
85
+ summary: 'ABodyBuilder3 Language -> Predict',
86
+ description: 'ABodyBuilder3 Language -> Predict',
87
+ stainlessPath: '(resource) v3.abodybuilder3_language > (method) predict',
88
+ qualified: 'client.v3.abodybuilder3Language.predict',
89
+ params: ['body?: object;'],
90
+ markdown:
91
+ "## predict\n\n`client.v3.abodybuilder3Language.predict(body?: object): void`\n\n**post** `/api/v3/abodybuilder3-language/predict/`\n\nABodyBuilder3 Language -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.abodybuilder3Language.predict()\n```",
92
+ perLanguage: {
93
+ typescript: {
94
+ method: 'client.v3.abodybuilder3Language.predict',
95
+ example:
96
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.abodybuilder3Language.predict();",
97
+ },
98
+ python: {
99
+ method: 'v3.abodybuilder3_language.predict',
100
+ example:
101
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.abodybuilder3_language.predict()',
102
+ },
103
+ http: {
104
+ example:
105
+ 'curl https://biolm.ai/api/v3/abodybuilder3-language/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
106
+ },
107
+ },
108
+ },
109
+ {
110
+ name: 'predict',
111
+ endpoint: '/api/v3/antifold/predict/',
112
+ httpMethod: 'post',
113
+ summary: 'AntiFold -> Predict',
114
+ description: 'AntiFold -> Predict',
115
+ stainlessPath: '(resource) v3.antifold > (method) predict',
116
+ qualified: 'client.v3.antifold.predict',
117
+ params: ['body?: object;'],
118
+ markdown:
119
+ "## predict\n\n`client.v3.antifold.predict(body?: object): void`\n\n**post** `/api/v3/antifold/predict/`\n\nAntiFold -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.antifold.predict()\n```",
120
+ perLanguage: {
121
+ typescript: {
122
+ method: 'client.v3.antifold.predict',
123
+ example:
124
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.antifold.predict();",
125
+ },
126
+ python: {
127
+ method: 'v3.antifold.predict',
128
+ example:
129
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.antifold.predict()',
130
+ },
131
+ http: {
132
+ example:
133
+ 'curl https://biolm.ai/api/v3/antifold/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
134
+ },
135
+ },
136
+ },
137
+ {
138
+ name: 'generate',
139
+ endpoint: '/api/v3/antifold/generate/',
140
+ httpMethod: 'post',
141
+ summary: 'AntiFold -> Generate',
142
+ description: 'AntiFold -> Generate',
143
+ stainlessPath: '(resource) v3.antifold > (method) generate',
144
+ qualified: 'client.v3.antifold.generate',
145
+ params: ['body?: object;'],
146
+ markdown:
147
+ "## generate\n\n`client.v3.antifold.generate(body?: object): void`\n\n**post** `/api/v3/antifold/generate/`\n\nAntiFold -> Generate\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.antifold.generate()\n```",
148
+ perLanguage: {
149
+ typescript: {
150
+ method: 'client.v3.antifold.generate',
151
+ example:
152
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.antifold.generate();",
153
+ },
154
+ python: {
155
+ method: 'v3.antifold.generate',
156
+ example:
157
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.antifold.generate()',
158
+ },
159
+ http: {
160
+ example:
161
+ 'curl https://biolm.ai/api/v3/antifold/generate/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
162
+ },
163
+ },
164
+ },
165
+ {
166
+ name: 'predict',
167
+ endpoint: '/api/v3/biolmtox2/predict/',
168
+ httpMethod: 'post',
169
+ summary: 'BioLMTox-2 -> Predict',
170
+ description: 'BioLMTox-2 -> Predict',
171
+ stainlessPath: '(resource) v3.biolmtox2 > (method) predict',
172
+ qualified: 'client.v3.biolmtox2.predict',
173
+ params: ['body?: object;'],
174
+ markdown:
175
+ "## predict\n\n`client.v3.biolmtox2.predict(body?: object): void`\n\n**post** `/api/v3/biolmtox2/predict/`\n\nBioLMTox-2 -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.biolmtox2.predict()\n```",
176
+ perLanguage: {
177
+ typescript: {
178
+ method: 'client.v3.biolmtox2.predict',
179
+ example:
180
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.biolmtox2.predict();",
181
+ },
182
+ python: {
183
+ method: 'v3.biolmtox2.predict',
184
+ example:
185
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.biolmtox2.predict()',
186
+ },
187
+ http: {
188
+ example:
189
+ 'curl https://biolm.ai/api/v3/biolmtox2/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
190
+ },
191
+ },
192
+ },
193
+ {
194
+ name: 'predict',
195
+ endpoint: '/api/v3/dna-chisel/predict/',
196
+ httpMethod: 'post',
197
+ summary: 'DNA Chisel -> Predict',
198
+ description: 'DNA Chisel -> Predict',
199
+ stainlessPath: '(resource) v3.dna_chisel > (method) predict',
200
+ qualified: 'client.v3.dnaChisel.predict',
201
+ params: ['body?: object;'],
202
+ markdown:
203
+ "## predict\n\n`client.v3.dnaChisel.predict(body?: object): void`\n\n**post** `/api/v3/dna-chisel/predict/`\n\nDNA Chisel -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.dnaChisel.predict()\n```",
204
+ perLanguage: {
205
+ typescript: {
206
+ method: 'client.v3.dnaChisel.predict',
207
+ example:
208
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.dnaChisel.predict();",
209
+ },
210
+ python: {
211
+ method: 'v3.dna_chisel.predict',
212
+ example:
213
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.dna_chisel.predict()',
214
+ },
215
+ http: {
216
+ example:
217
+ 'curl https://biolm.ai/api/v3/dna-chisel/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
218
+ },
219
+ },
220
+ },
221
+ {
222
+ name: 'predict',
223
+ endpoint: '/api/v3/esm1v-all/predict/',
224
+ httpMethod: 'post',
225
+ summary: 'ESM-1v -> Predict',
226
+ description: 'ESM-1v -> Predict',
227
+ stainlessPath: '(resource) v3.esm1v_all > (method) predict',
228
+ qualified: 'client.v3.esm1vAll.predict',
229
+ params: ['body?: object;'],
230
+ markdown:
231
+ "## predict\n\n`client.v3.esm1vAll.predict(body?: object): void`\n\n**post** `/api/v3/esm1v-all/predict/`\n\nESM-1v -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.esm1vAll.predict()\n```",
232
+ perLanguage: {
233
+ typescript: {
234
+ method: 'client.v3.esm1vAll.predict',
235
+ example:
236
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.esm1vAll.predict();",
237
+ },
238
+ python: {
239
+ method: 'v3.esm1v_all.predict',
240
+ example:
241
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.esm1v_all.predict()',
242
+ },
243
+ http: {
244
+ example:
245
+ 'curl https://biolm.ai/api/v3/esm1v-all/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
246
+ },
247
+ },
248
+ },
249
+ {
250
+ name: 'predict',
251
+ endpoint: '/api/v3/esm2-150m/predict/',
252
+ httpMethod: 'post',
253
+ summary: 'ESM-2 150M -> Predict',
254
+ description: 'ESM-2 150M -> Predict',
255
+ stainlessPath: '(resource) v3.esm2_150m > (method) predict',
256
+ qualified: 'client.v3.esm2_150m.predict',
257
+ params: ['body?: object;'],
258
+ markdown:
259
+ "## predict\n\n`client.v3.esm2_150m.predict(body?: object): void`\n\n**post** `/api/v3/esm2-150m/predict/`\n\nESM-2 150M -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.esm2_150m.predict()\n```",
260
+ perLanguage: {
261
+ typescript: {
262
+ method: 'client.v3.esm2_150m.predict',
263
+ example:
264
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.esm2_150m.predict();",
265
+ },
266
+ python: {
267
+ method: 'v3.esm2_150m.predict',
268
+ example:
269
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.esm2_150m.predict()',
270
+ },
271
+ http: {
272
+ example:
273
+ 'curl https://biolm.ai/api/v3/esm2-150m/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
274
+ },
275
+ },
276
+ },
277
+ {
278
+ name: 'predict',
279
+ endpoint: '/api/v3/esmc-300m/predict/',
280
+ httpMethod: 'post',
281
+ summary: 'ESM C 300M -> Predict',
282
+ description: 'ESM C 300M -> Predict',
283
+ stainlessPath: '(resource) v3.esmc_300m > (method) predict',
284
+ qualified: 'client.v3.esmc300m.predict',
285
+ params: ['body?: object;'],
286
+ markdown:
287
+ "## predict\n\n`client.v3.esmc300m.predict(body?: object): void`\n\n**post** `/api/v3/esmc-300m/predict/`\n\nESM C 300M -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.esmc300m.predict()\n```",
288
+ perLanguage: {
289
+ typescript: {
290
+ method: 'client.v3.esmc300m.predict',
291
+ example:
292
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.esmc300m.predict();",
293
+ },
294
+ python: {
295
+ method: 'v3.esmc_300m.predict',
296
+ example:
297
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.esmc_300m.predict()',
298
+ },
299
+ http: {
300
+ example:
301
+ 'curl https://biolm.ai/api/v3/esmc-300m/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
302
+ },
303
+ },
304
+ },
305
+ {
306
+ name: 'predict',
307
+ endpoint: '/api/v3/esmc-600m/predict/',
308
+ httpMethod: 'post',
309
+ summary: 'ESM C 600M -> Predict',
310
+ description: 'ESM C 600M -> Predict',
311
+ stainlessPath: '(resource) v3.esmc_600m > (method) predict',
312
+ qualified: 'client.v3.esmc600m.predict',
313
+ params: ['body?: object;'],
314
+ markdown:
315
+ "## predict\n\n`client.v3.esmc600m.predict(body?: object): void`\n\n**post** `/api/v3/esmc-600m/predict/`\n\nESM C 600M -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.esmc600m.predict()\n```",
316
+ perLanguage: {
317
+ typescript: {
318
+ method: 'client.v3.esmc600m.predict',
319
+ example:
320
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.esmc600m.predict();",
321
+ },
322
+ python: {
323
+ method: 'v3.esmc_600m.predict',
324
+ example:
325
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.esmc_600m.predict()',
326
+ },
327
+ http: {
328
+ example:
329
+ 'curl https://biolm.ai/api/v3/esmc-600m/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
330
+ },
331
+ },
332
+ },
333
+ {
334
+ name: 'predict',
335
+ endpoint: '/api/v3/esmfold/predict/',
336
+ httpMethod: 'post',
337
+ summary: 'ESMFold -> Predict',
338
+ description: 'ESMFold -> Predict',
339
+ stainlessPath: '(resource) v3.esmfold > (method) predict',
340
+ qualified: 'client.v3.esmfold.predict',
341
+ params: ['body?: object;'],
342
+ markdown:
343
+ "## predict\n\n`client.v3.esmfold.predict(body?: object): void`\n\n**post** `/api/v3/esmfold/predict/`\n\nESMFold -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.esmfold.predict()\n```",
344
+ perLanguage: {
345
+ typescript: {
346
+ method: 'client.v3.esmfold.predict',
347
+ example:
348
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.esmfold.predict();",
349
+ },
350
+ python: {
351
+ method: 'v3.esmfold.predict',
352
+ example:
353
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.esmfold.predict()',
354
+ },
355
+ http: {
356
+ example:
357
+ 'curl https://biolm.ai/api/v3/esmfold/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
358
+ },
359
+ },
360
+ },
361
+ {
362
+ name: 'predict',
363
+ endpoint: '/api/v3/evo2-1b-base/predict/',
364
+ httpMethod: 'post',
365
+ summary: 'Evo 2 1B Base -> Predict',
366
+ description: 'Evo 2 1B Base -> Predict',
367
+ stainlessPath: '(resource) v3.evo2_1b_base > (method) predict',
368
+ qualified: 'client.v3.evo2_1bBase.predict',
369
+ params: ['body?: object;'],
370
+ markdown:
371
+ "## predict\n\n`client.v3.evo2_1bBase.predict(body?: object): void`\n\n**post** `/api/v3/evo2-1b-base/predict/`\n\nEvo 2 1B Base -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.evo2_1bBase.predict()\n```",
372
+ perLanguage: {
373
+ typescript: {
374
+ method: 'client.v3.evo2_1bBase.predict',
375
+ example:
376
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.evo2_1bBase.predict();",
377
+ },
378
+ python: {
379
+ method: 'v3.evo2_1b_base.predict',
380
+ example:
381
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.evo2_1b_base.predict()',
382
+ },
383
+ http: {
384
+ example:
385
+ 'curl https://biolm.ai/api/v3/evo2-1b-base/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
386
+ },
387
+ },
388
+ },
389
+ {
390
+ name: 'generate',
391
+ endpoint: '/api/v3/evo2-1b-base/generate/',
392
+ httpMethod: 'post',
393
+ summary: 'Evo 2 1B Base -> Generate',
394
+ description: 'Evo 2 1B Base -> Generate',
395
+ stainlessPath: '(resource) v3.evo2_1b_base > (method) generate',
396
+ qualified: 'client.v3.evo2_1bBase.generate',
397
+ params: ['body?: object;'],
398
+ markdown:
399
+ "## generate\n\n`client.v3.evo2_1bBase.generate(body?: object): void`\n\n**post** `/api/v3/evo2-1b-base/generate/`\n\nEvo 2 1B Base -> Generate\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.evo2_1bBase.generate()\n```",
400
+ perLanguage: {
401
+ typescript: {
402
+ method: 'client.v3.evo2_1bBase.generate',
403
+ example:
404
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.evo2_1bBase.generate();",
405
+ },
406
+ python: {
407
+ method: 'v3.evo2_1b_base.generate',
408
+ example:
409
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.evo2_1b_base.generate()',
410
+ },
411
+ http: {
412
+ example:
413
+ 'curl https://biolm.ai/api/v3/evo2-1b-base/generate/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
414
+ },
415
+ },
416
+ },
417
+ {
418
+ name: 'predict',
419
+ endpoint: '/api/v3/igbert-paired/predict/',
420
+ httpMethod: 'post',
421
+ summary: 'IgBert Paired -> Predict',
422
+ description: 'IgBert Paired -> Predict',
423
+ stainlessPath: '(resource) v3.igbert_paired > (method) predict',
424
+ qualified: 'client.v3.igbertPaired.predict',
425
+ params: ['body?: object;'],
426
+ markdown:
427
+ "## predict\n\n`client.v3.igbertPaired.predict(body?: object): void`\n\n**post** `/api/v3/igbert-paired/predict/`\n\nIgBert Paired -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.igbertPaired.predict()\n```",
428
+ perLanguage: {
429
+ typescript: {
430
+ method: 'client.v3.igbertPaired.predict',
431
+ example:
432
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.igbertPaired.predict();",
433
+ },
434
+ python: {
435
+ method: 'v3.igbert_paired.predict',
436
+ example:
437
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.igbert_paired.predict()',
438
+ },
439
+ http: {
440
+ example:
441
+ 'curl https://biolm.ai/api/v3/igbert-paired/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
442
+ },
443
+ },
444
+ },
445
+ {
446
+ name: 'predict',
447
+ endpoint: '/api/v3/igbert-unpaired/predict/',
448
+ httpMethod: 'post',
449
+ summary: 'IgBert Unpaired -> Predict',
450
+ description: 'IgBert Unpaired -> Predict',
451
+ stainlessPath: '(resource) v3.igbert_unpaired > (method) predict',
452
+ qualified: 'client.v3.igbertUnpaired.predict',
453
+ params: ['body?: object;'],
454
+ markdown:
455
+ "## predict\n\n`client.v3.igbertUnpaired.predict(body?: object): void`\n\n**post** `/api/v3/igbert-unpaired/predict/`\n\nIgBert Unpaired -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.igbertUnpaired.predict()\n```",
456
+ perLanguage: {
457
+ typescript: {
458
+ method: 'client.v3.igbertUnpaired.predict',
459
+ example:
460
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.igbertUnpaired.predict();",
461
+ },
462
+ python: {
463
+ method: 'v3.igbert_unpaired.predict',
464
+ example:
465
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.igbert_unpaired.predict()',
466
+ },
467
+ http: {
468
+ example:
469
+ 'curl https://biolm.ai/api/v3/igbert-unpaired/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
470
+ },
471
+ },
472
+ },
473
+ {
474
+ name: 'predict',
475
+ endpoint: '/api/v3/nanobert/predict/',
476
+ httpMethod: 'post',
477
+ summary: 'nanoBERT -> Predict',
478
+ description: 'nanoBERT -> Predict',
479
+ stainlessPath: '(resource) v3.nanobert > (method) predict',
480
+ qualified: 'client.v3.nanobert.predict',
481
+ params: ['body?: object;'],
482
+ markdown:
483
+ "## predict\n\n`client.v3.nanobert.predict(body?: object): void`\n\n**post** `/api/v3/nanobert/predict/`\n\nnanoBERT -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.nanobert.predict()\n```",
484
+ perLanguage: {
485
+ typescript: {
486
+ method: 'client.v3.nanobert.predict',
487
+ example:
488
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.nanobert.predict();",
489
+ },
490
+ python: {
491
+ method: 'v3.nanobert.predict',
492
+ example:
493
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.nanobert.predict()',
494
+ },
495
+ http: {
496
+ example:
497
+ 'curl https://biolm.ai/api/v3/nanobert/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
498
+ },
499
+ },
500
+ },
501
+ {
502
+ name: 'predict',
503
+ endpoint: '/api/v3/nanobodybuilder2/predict/',
504
+ httpMethod: 'post',
505
+ summary: 'NanoBodyBuilder2 -> Predict',
506
+ description: 'NanoBodyBuilder2 -> Predict',
507
+ stainlessPath: '(resource) v3.nanobodybuilder2 > (method) predict',
508
+ qualified: 'client.v3.nanobodybuilder2.predict',
509
+ params: ['body?: object;'],
510
+ markdown:
511
+ "## predict\n\n`client.v3.nanobodybuilder2.predict(body?: object): void`\n\n**post** `/api/v3/nanobodybuilder2/predict/`\n\nNanoBodyBuilder2 -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.nanobodybuilder2.predict()\n```",
512
+ perLanguage: {
513
+ typescript: {
514
+ method: 'client.v3.nanobodybuilder2.predict',
515
+ example:
516
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.nanobodybuilder2.predict();",
517
+ },
518
+ python: {
519
+ method: 'v3.nanobodybuilder2.predict',
520
+ example:
521
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.nanobodybuilder2.predict()',
522
+ },
523
+ http: {
524
+ example:
525
+ 'curl https://biolm.ai/api/v3/nanobodybuilder2/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
526
+ },
527
+ },
528
+ },
529
+ {
530
+ name: 'predict',
531
+ endpoint: '/api/v3/sadie-antibody/predict/',
532
+ httpMethod: 'post',
533
+ summary: 'Sadie Antibody -> Predict',
534
+ description: 'Sadie Antibody -> Predict',
535
+ stainlessPath: '(resource) v3.sadie_antibody > (method) predict',
536
+ qualified: 'client.v3.sadieAntibody.predict',
537
+ params: ['body?: object;'],
538
+ markdown:
539
+ "## predict\n\n`client.v3.sadieAntibody.predict(body?: object): void`\n\n**post** `/api/v3/sadie-antibody/predict/`\n\nSadie Antibody -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.sadieAntibody.predict()\n```",
540
+ perLanguage: {
541
+ typescript: {
542
+ method: 'client.v3.sadieAntibody.predict',
543
+ example:
544
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.sadieAntibody.predict();",
545
+ },
546
+ python: {
547
+ method: 'v3.sadie_antibody.predict',
548
+ example:
549
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.sadie_antibody.predict()',
550
+ },
551
+ http: {
552
+ example:
553
+ 'curl https://biolm.ai/api/v3/sadie-antibody/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
554
+ },
555
+ },
556
+ },
557
+ {
558
+ name: 'predict',
559
+ endpoint: '/api/v3/tempro-650m/predict/',
560
+ httpMethod: 'post',
561
+ summary: 'TEMPRO 650M -> Predict',
562
+ description: 'TEMPRO 650M -> Predict',
563
+ stainlessPath: '(resource) v3.tempro_650m > (method) predict',
564
+ qualified: 'client.v3.tempro650m.predict',
565
+ params: ['body?: object;'],
566
+ markdown:
567
+ "## predict\n\n`client.v3.tempro650m.predict(body?: object): void`\n\n**post** `/api/v3/tempro-650m/predict/`\n\nTEMPRO 650M -> Predict\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.tempro650m.predict()\n```",
568
+ perLanguage: {
569
+ typescript: {
570
+ method: 'client.v3.tempro650m.predict',
571
+ example:
572
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.tempro650m.predict();",
573
+ },
574
+ python: {
575
+ method: 'v3.tempro_650m.predict',
576
+ example:
577
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.tempro_650m.predict()',
578
+ },
579
+ http: {
580
+ example:
581
+ 'curl https://biolm.ai/api/v3/tempro-650m/predict/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
582
+ },
583
+ },
584
+ },
585
+ {
586
+ name: 'encode',
587
+ endpoint: '/api/v3/peptides/encode/',
588
+ httpMethod: 'post',
589
+ summary: 'Peptides -> Encode',
590
+ description: 'Peptides -> Encode',
591
+ stainlessPath: '(resource) v3.peptides > (method) encode',
592
+ qualified: 'client.v3.peptides.encode',
593
+ params: ['body?: object;'],
594
+ markdown:
595
+ "## encode\n\n`client.v3.peptides.encode(body?: object): void`\n\n**post** `/api/v3/peptides/encode/`\n\nPeptides -> Encode\n\n### Parameters\n\n- `body?: object`\n\n### Example\n\n```typescript\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm();\n\nawait client.v3.peptides.encode()\n```",
596
+ perLanguage: {
597
+ typescript: {
598
+ method: 'client.v3.peptides.encode',
599
+ example:
600
+ "import BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.peptides.encode();",
601
+ },
602
+ python: {
603
+ method: 'v3.peptides.encode',
604
+ example:
605
+ 'import os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\nclient.v3.peptides.encode()',
606
+ },
607
+ http: {
608
+ example:
609
+ 'curl https://biolm.ai/api/v3/peptides/encode/ \\\n -X POST \\\n -H "Authorization: Bearer $BIOLMAI_TOKEN"',
610
+ },
611
+ },
612
+ },
613
+ ];
614
+
615
+ const EMBEDDED_READMES: { language: string; content: string }[] = [
616
+ {
617
+ language: 'python',
618
+ content:
619
+ '# Bio Lm Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/biolm.svg?label=pypi%20(stable))](https://pypi.org/project/biolm/)\n\nThe Bio Lm Python library provides convenient access to the Bio Lm REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Bio Lm MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40biolm%2Fbiolm-models-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBiaW9sbS9iaW9sbS1tb2RlbHMtbWNwIl0sImVudiI6eyJCSU9MTUFJX1RPS0VOIjoiTXkgQVBJIEtleSIsIkJJT19MTV9BQ0NFU1NfVE9LRU4iOiJNeSBBY2Nlc3MgVG9rZW4ifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40biolm%2Fbiolm-models-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40biolm%2Fbiolm-models-mcp%22%5D%2C%22env%22%3A%7B%22BIOLMAI_TOKEN%22%3A%22My%20API%20Key%22%2C%22BIO_LM_ACCESS_TOKEN%22%3A%22My%20Access%20Token%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [api.biolm.ai](https://api.biolm.ai). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from this staging repo\npip install git+ssh://git@github.com/stainless-sdks/biolm-postman-sync-python.git\n```\n> [!NOTE]\n> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install biolm`\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom biolm import BioLm\n\nclient = BioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\n\nclient.v3.ablang2.predict()\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `BIOLMAI_TOKEN="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncBioLm` instead of `BioLm` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom biolm import AsyncBioLm\n\nclient = AsyncBioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n await client.v3.ablang2.predict()\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from this staging repo\npip install \'biolm[aiohttp] @ git+ssh://git@github.com/stainless-sdks/biolm-postman-sync-python.git\'\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom biolm import DefaultAioHttpClient\nfrom biolm import AsyncBioLm\n\nasync def main() -> None:\n async with AsyncBioLm(\n api_key=os.environ.get("BIOLMAI_TOKEN"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n await client.v3.ablang2.predict()\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `biolm.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `biolm.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `biolm.APIError`.\n\n```python\nimport biolm\nfrom biolm import BioLm\n\nclient = BioLm()\n\ntry:\n client.v3.ablang2.predict()\nexcept biolm.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept biolm.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept biolm.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom biolm import BioLm\n\n# Configure the default for all requests:\nclient = BioLm(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).v3.ablang2.predict()\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom biolm import BioLm\n\n# Configure the default for all requests:\nclient = BioLm(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = BioLm(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).v3.ablang2.predict()\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `BIO_LM_LOG` to `info`.\n\n```shell\n$ export BIO_LM_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom biolm import BioLm\n\nclient = BioLm()\nresponse = client.v3.ablang2.with_raw_response.predict()\nprint(response.headers.get(\'X-My-Header\'))\n\nablang2 = response.parse() # get the object that `v3.ablang2.predict()` would have returned\nprint(ablang2)\n```\n\nThese methods return an [`APIResponse`](https://github.com/stainless-sdks/biolm-postman-sync-python/tree/main/src/biolm/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/biolm-postman-sync-python/tree/main/src/biolm/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.v3.ablang2.with_streaming_response.predict() as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom biolm import BioLm, DefaultHttpxClient\n\nclient = BioLm(\n # Or use the `BIO_LM_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom biolm import BioLm\n\nwith BioLm() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/biolm-postman-sync-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport biolm\nprint(biolm.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
620
+ },
621
+ {
622
+ language: 'typescript',
623
+ content:
624
+ "# Bio Lm TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@biolm/biolm-models.svg?label=npm%20(stable))](https://npmjs.org/package/@biolm/biolm-models) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@biolm/biolm-models)\n\nThis library provides convenient access to the Bio Lm REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [api.biolm.ai](https://api.biolm.ai). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Bio Lm MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40biolm%2Fbiolm-models-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBiaW9sbS9iaW9sbS1tb2RlbHMtbWNwIl0sImVudiI6eyJCSU9MTUFJX1RPS0VOIjoiTXkgQVBJIEtleSIsIkJJT19MTV9BQ0NFU1NfVE9LRU4iOiJNeSBBY2Nlc3MgVG9rZW4ifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40biolm%2Fbiolm-models-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40biolm%2Fbiolm-models-mcp%22%5D%2C%22env%22%3A%7B%22BIOLMAI_TOKEN%22%3A%22My%20API%20Key%22%2C%22BIO_LM_ACCESS_TOKEN%22%3A%22My%20Access%20Token%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install git+ssh://git@github.com:BioLM/biolm-models-mcp.git\n```\n> [!NOTE]\n> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install @biolm/biolm-models`\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.ablang2.predict();\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n apiKey: process.env['BIOLMAI_TOKEN'], // This is the default and can be omitted\n});\n\nawait client.v3.ablang2.predict();\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst response = await client.v3.ablang2.predict().catch(async (err) => {\n if (err instanceof BioLm.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new BioLm({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.v3.ablang2.predict({\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new BioLm({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.v3.ablang2.predict({\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new BioLm();\n\nconst response = await client.v3.ablang2.predict().asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: result, response: raw } = await client.v3.ablang2.predict().withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(result);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `BIO_LM_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport BioLm from '@biolm/biolm-models';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new BioLm({\n logger: logger.child({ name: 'BioLm' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.v3.ablang2.predict({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport BioLm from '@biolm/biolm-models';\nimport fetch from 'my-fetch';\n\nconst client = new BioLm({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport BioLm from '@biolm/biolm-models';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new BioLm({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport BioLm from '@biolm/biolm-models';\n\nconst client = new BioLm({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport BioLm from 'npm:@biolm/biolm-models';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new BioLm({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/BioLM/biolm-models-mcp/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
625
+ },
626
+ ];
627
+
628
+ const INDEX_OPTIONS = {
629
+ fields: [
630
+ 'name',
631
+ 'endpoint',
632
+ 'summary',
633
+ 'description',
634
+ 'qualified',
635
+ 'stainlessPath',
636
+ 'content',
637
+ 'sectionContext',
638
+ ],
639
+ storeFields: ['kind', '_original'],
640
+ searchOptions: {
641
+ prefix: true,
642
+ fuzzy: 0.1,
643
+ boost: {
644
+ name: 5,
645
+ stainlessPath: 3,
646
+ endpoint: 3,
647
+ qualified: 3,
648
+ summary: 2,
649
+ content: 1,
650
+ description: 1,
651
+ } as Record<string, number>,
652
+ },
653
+ };
654
+
655
+ /**
656
+ * Self-contained local search engine backed by MiniSearch.
657
+ * Method data is embedded at SDK build time; prose documents
658
+ * can be loaded from an optional docs directory at runtime.
659
+ */
660
+ export class LocalDocsSearch {
661
+ private methodIndex: MiniSearch<MiniSearchDocument>;
662
+ private proseIndex: MiniSearch<MiniSearchDocument>;
663
+
664
+ private constructor() {
665
+ this.methodIndex = new MiniSearch<MiniSearchDocument>(INDEX_OPTIONS);
666
+ this.proseIndex = new MiniSearch<MiniSearchDocument>(INDEX_OPTIONS);
667
+ }
668
+
669
+ static async create(opts?: { docsDir?: string }): Promise<LocalDocsSearch> {
670
+ const instance = new LocalDocsSearch();
671
+ instance.indexMethods(EMBEDDED_METHODS);
672
+ for (const readme of EMBEDDED_READMES) {
673
+ instance.indexProse(readme.content, `readme:${readme.language}`);
674
+ }
675
+ if (opts?.docsDir) {
676
+ await instance.loadDocsDirectory(opts.docsDir);
677
+ }
678
+ return instance;
679
+ }
680
+
681
+ search(props: {
682
+ query: string;
683
+ language?: string;
684
+ detail?: string;
685
+ maxResults?: number;
686
+ maxLength?: number;
687
+ }): SearchResult {
688
+ const { query, language = 'typescript', detail = 'default', maxResults = 5, maxLength = 100_000 } = props;
689
+
690
+ const useMarkdown = detail === 'verbose' || detail === 'high';
691
+
692
+ // Search both indices and merge results by score.
693
+ // Filter prose hits so language-tagged content (READMEs and docs with
694
+ // frontmatter) only matches the requested language.
695
+ const methodHits = this.methodIndex
696
+ .search(query)
697
+ .map((hit) => ({ ...hit, _kind: 'http_method' as const }));
698
+ const proseHits = this.proseIndex
699
+ .search(query)
700
+ .filter((hit) => {
701
+ const source = ((hit as Record<string, unknown>)['_original'] as ProseChunk | undefined)?.source;
702
+ if (!source) return true;
703
+ // Check for language-tagged sources: "readme:<lang>" or "lang:<lang>:<filename>"
704
+ let taggedLang: string | undefined;
705
+ if (source.startsWith('readme:')) taggedLang = source.slice('readme:'.length);
706
+ else if (source.startsWith('lang:')) taggedLang = source.split(':')[1];
707
+ if (!taggedLang) return true;
708
+ return taggedLang === language || (language === 'javascript' && taggedLang === 'typescript');
709
+ })
710
+ .map((hit) => ({ ...hit, _kind: 'prose' as const }));
711
+ const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score);
712
+ const top = merged.slice(0, maxResults);
713
+
714
+ const fullResults: (string | Record<string, unknown>)[] = [];
715
+
716
+ for (const hit of top) {
717
+ const original = (hit as Record<string, unknown>)['_original'];
718
+ if (hit._kind === 'http_method') {
719
+ const m = original as MethodEntry;
720
+ if (useMarkdown && m.markdown) {
721
+ fullResults.push(m.markdown);
722
+ } else {
723
+ // Use per-language data when available, falling back to the
724
+ // top-level fields (which are TypeScript-specific in the
725
+ // legacy codepath).
726
+ const langData = m.perLanguage?.[language];
727
+ fullResults.push({
728
+ method: langData?.method ?? m.qualified,
729
+ summary: m.summary,
730
+ description: m.description,
731
+ endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`,
732
+ ...(langData?.example ? { example: langData.example } : {}),
733
+ ...(m.params ? { params: m.params } : {}),
734
+ ...(m.response ? { response: m.response } : {}),
735
+ });
736
+ }
737
+ } else {
738
+ const c = original as ProseChunk;
739
+ fullResults.push({
740
+ content: c.content,
741
+ ...(c.source ? { source: c.source } : {}),
742
+ });
743
+ }
744
+ }
745
+
746
+ let totalLength = 0;
747
+ const results: (string | Record<string, unknown>)[] = [];
748
+ for (const result of fullResults) {
749
+ const len = typeof result === 'string' ? result.length : JSON.stringify(result).length;
750
+ totalLength += len;
751
+ if (totalLength > maxLength) break;
752
+ results.push(result);
753
+ }
754
+
755
+ if (results.length < fullResults.length) {
756
+ results.unshift(`Truncated; showing ${results.length} of ${fullResults.length} results.`);
757
+ }
758
+
759
+ return { results };
760
+ }
761
+
762
+ private indexMethods(methods: MethodEntry[]): void {
763
+ const docs: MiniSearchDocument[] = methods.map((m, i) => ({
764
+ id: `method-${i}`,
765
+ kind: 'http_method' as const,
766
+ name: m.name,
767
+ endpoint: m.endpoint,
768
+ summary: m.summary,
769
+ description: m.description,
770
+ qualified: m.qualified,
771
+ stainlessPath: m.stainlessPath,
772
+ _original: m as unknown as Record<string, unknown>,
773
+ }));
774
+ if (docs.length > 0) {
775
+ this.methodIndex.addAll(docs);
776
+ }
777
+ }
778
+
779
+ private async loadDocsDirectory(docsDir: string): Promise<void> {
780
+ let entries;
781
+ try {
782
+ entries = await fs.readdir(docsDir, { withFileTypes: true });
783
+ } catch (err) {
784
+ getLogger().warn({ err, docsDir }, 'Could not read docs directory');
785
+ return;
786
+ }
787
+
788
+ const files = entries
789
+ .filter((e) => e.isFile())
790
+ .filter((e) => e.name.endsWith('.md') || e.name.endsWith('.markdown') || e.name.endsWith('.json'));
791
+
792
+ for (const file of files) {
793
+ try {
794
+ const filePath = path.join(docsDir, file.name);
795
+ const content = await fs.readFile(filePath, 'utf-8');
796
+
797
+ if (file.name.endsWith('.json')) {
798
+ const texts = extractTexts(JSON.parse(content));
799
+ if (texts.length > 0) {
800
+ this.indexProse(texts.join('\n\n'), file.name);
801
+ }
802
+ } else {
803
+ // Parse optional YAML frontmatter for language tagging.
804
+ // Files with a "language" field in frontmatter will only
805
+ // surface in searches for that language.
806
+ //
807
+ // Example:
808
+ // ---
809
+ // language: python
810
+ // ---
811
+ // # Error handling in Python
812
+ // ...
813
+ const frontmatter = parseFrontmatter(content);
814
+ const source = frontmatter.language ? `lang:${frontmatter.language}:${file.name}` : file.name;
815
+ this.indexProse(content, source);
816
+ }
817
+ } catch (err) {
818
+ getLogger().warn({ err, file: file.name }, 'Failed to index docs file');
819
+ }
820
+ }
821
+ }
822
+
823
+ private indexProse(markdown: string, source: string): void {
824
+ const chunks = chunkMarkdown(markdown);
825
+ const baseId = this.proseIndex.documentCount;
826
+
827
+ const docs: MiniSearchDocument[] = chunks.map((chunk, i) => ({
828
+ id: `prose-${baseId + i}`,
829
+ kind: 'prose' as const,
830
+ content: chunk.content,
831
+ ...(chunk.sectionContext != null ? { sectionContext: chunk.sectionContext } : {}),
832
+ _original: { ...chunk, source } as unknown as Record<string, unknown>,
833
+ }));
834
+
835
+ if (docs.length > 0) {
836
+ this.proseIndex.addAll(docs);
837
+ }
838
+ }
839
+ }
840
+
841
+ /** Lightweight markdown chunker — splits on headers, chunks by word count. */
842
+ function chunkMarkdown(markdown: string): { content: string; tag: string; sectionContext?: string }[] {
843
+ // Strip YAML frontmatter
844
+ const stripped = markdown.replace(/^---\n[\s\S]*?\n---\n?/, '');
845
+ const lines = stripped.split('\n');
846
+
847
+ const chunks: { content: string; tag: string; sectionContext?: string }[] = [];
848
+ const headers: string[] = [];
849
+ let current: string[] = [];
850
+
851
+ const flush = () => {
852
+ const text = current.join('\n').trim();
853
+ if (!text) return;
854
+ const sectionContext = headers.length > 0 ? headers.join(' > ') : undefined;
855
+ // Split into ~200-word chunks
856
+ const words = text.split(/\s+/);
857
+ for (let i = 0; i < words.length; i += 200) {
858
+ const slice = words.slice(i, i + 200).join(' ');
859
+ if (slice) {
860
+ chunks.push({ content: slice, tag: 'p', ...(sectionContext != null ? { sectionContext } : {}) });
861
+ }
862
+ }
863
+ current = [];
864
+ };
865
+
866
+ for (const line of lines) {
867
+ const headerMatch = line.match(/^(#{1,6})\s+(.+)/);
868
+ if (headerMatch) {
869
+ flush();
870
+ const level = headerMatch[1]!.length;
871
+ const text = headerMatch[2]!.trim();
872
+ while (headers.length >= level) headers.pop();
873
+ headers.push(text);
874
+ } else {
875
+ current.push(line);
876
+ }
877
+ }
878
+ flush();
879
+
880
+ return chunks;
881
+ }
882
+
883
+ /** Recursively extracts string values from a JSON structure. */
884
+ function extractTexts(data: unknown, depth = 0): string[] {
885
+ if (depth > 10) return [];
886
+ if (typeof data === 'string') return data.trim() ? [data] : [];
887
+ if (Array.isArray(data)) return data.flatMap((item) => extractTexts(item, depth + 1));
888
+ if (typeof data === 'object' && data !== null) {
889
+ return Object.values(data).flatMap((v) => extractTexts(v, depth + 1));
890
+ }
891
+ return [];
892
+ }
893
+
894
+ /** Parses YAML frontmatter from a markdown string, extracting the language field if present. */
895
+ function parseFrontmatter(markdown: string): { language?: string } {
896
+ const match = markdown.match(/^---\n([\s\S]*?)\n---/);
897
+ if (!match) return {};
898
+ const body = match[1] ?? '';
899
+ const langMatch = body.match(/^language:\s*(.+)$/m);
900
+ return langMatch ? { language: langMatch[1]!.trim() } : {};
901
+ }