@soederpop/luca 0.0.10 → 0.0.11
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-20T00:15:39.223Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.googleDocs', {
|
|
7
7
|
"id": "features.googleDocs",
|
|
@@ -9519,270 +9519,198 @@ setBuildTimeData('clients.websocket', {
|
|
|
9519
9519
|
]
|
|
9520
9520
|
});
|
|
9521
9521
|
|
|
9522
|
-
setBuildTimeData('clients.
|
|
9523
|
-
"id": "clients.
|
|
9524
|
-
"description": "
|
|
9525
|
-
"shortcut": "clients.
|
|
9526
|
-
"className": "
|
|
9522
|
+
setBuildTimeData('clients.supabase', {
|
|
9523
|
+
"id": "clients.supabase",
|
|
9524
|
+
"description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
|
|
9525
|
+
"shortcut": "clients.supabase",
|
|
9526
|
+
"className": "SupabaseClient",
|
|
9527
9527
|
"methods": {
|
|
9528
|
-
"
|
|
9529
|
-
"description": "
|
|
9530
|
-
"parameters": {},
|
|
9531
|
-
"required": [],
|
|
9532
|
-
"returns": "Promise<this>",
|
|
9533
|
-
"examples": [
|
|
9534
|
-
{
|
|
9535
|
-
"language": "ts",
|
|
9536
|
-
"code": "await openai.connect()"
|
|
9537
|
-
}
|
|
9538
|
-
]
|
|
9539
|
-
},
|
|
9540
|
-
"createChatCompletion": {
|
|
9541
|
-
"description": "Create a chat completion using the Chat Completions API.",
|
|
9528
|
+
"from": {
|
|
9529
|
+
"description": "Start a query on a Postgres table or view.",
|
|
9542
9530
|
"parameters": {
|
|
9543
|
-
"
|
|
9544
|
-
"type": "
|
|
9545
|
-
"description": "
|
|
9546
|
-
},
|
|
9547
|
-
"options": {
|
|
9548
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
9549
|
-
"description": "Additional parameters for the completion"
|
|
9531
|
+
"table": {
|
|
9532
|
+
"type": "string",
|
|
9533
|
+
"description": "The table or view name to query"
|
|
9550
9534
|
}
|
|
9551
9535
|
},
|
|
9552
9536
|
"required": [
|
|
9553
|
-
"
|
|
9537
|
+
"table"
|
|
9554
9538
|
],
|
|
9555
|
-
"returns": "
|
|
9556
|
-
"examples": [
|
|
9557
|
-
{
|
|
9558
|
-
"language": "ts",
|
|
9559
|
-
"code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
|
|
9560
|
-
}
|
|
9561
|
-
]
|
|
9539
|
+
"returns": "void"
|
|
9562
9540
|
},
|
|
9563
|
-
"
|
|
9564
|
-
"description": "
|
|
9541
|
+
"rpc": {
|
|
9542
|
+
"description": "Call a Postgres function (RPC).",
|
|
9565
9543
|
"parameters": {
|
|
9566
|
-
"
|
|
9567
|
-
"type": "
|
|
9568
|
-
"description": "The
|
|
9544
|
+
"fn": {
|
|
9545
|
+
"type": "string",
|
|
9546
|
+
"description": "The function name"
|
|
9569
9547
|
},
|
|
9570
|
-
"
|
|
9571
|
-
"type": "
|
|
9572
|
-
"description": "
|
|
9573
|
-
}
|
|
9574
|
-
},
|
|
9575
|
-
"required": [
|
|
9576
|
-
"input"
|
|
9577
|
-
],
|
|
9578
|
-
"returns": "Promise<OpenAI.Responses.Response>",
|
|
9579
|
-
"examples": [
|
|
9580
|
-
{
|
|
9581
|
-
"language": "ts",
|
|
9582
|
-
"code": "const response = await openai.createResponse('Explain quantum computing')"
|
|
9583
|
-
}
|
|
9584
|
-
]
|
|
9585
|
-
},
|
|
9586
|
-
"streamResponse": {
|
|
9587
|
-
"description": "Stream a response using the Responses API.",
|
|
9588
|
-
"parameters": {
|
|
9589
|
-
"input": {
|
|
9590
|
-
"type": "OpenAI.Responses.ResponseInput | string",
|
|
9591
|
-
"description": "The input prompt or message array"
|
|
9548
|
+
"params": {
|
|
9549
|
+
"type": "Record<string, unknown>",
|
|
9550
|
+
"description": "Arguments to pass to the function"
|
|
9592
9551
|
},
|
|
9593
9552
|
"options": {
|
|
9594
|
-
"type": "
|
|
9595
|
-
"description": "
|
|
9553
|
+
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
9554
|
+
"description": "Optional settings (head, get, count)"
|
|
9596
9555
|
}
|
|
9597
9556
|
},
|
|
9598
9557
|
"required": [
|
|
9599
|
-
"
|
|
9558
|
+
"fn"
|
|
9600
9559
|
],
|
|
9601
|
-
"returns": "
|
|
9602
|
-
"examples": [
|
|
9603
|
-
{
|
|
9604
|
-
"language": "ts",
|
|
9605
|
-
"code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
|
|
9606
|
-
}
|
|
9607
|
-
]
|
|
9560
|
+
"returns": "void"
|
|
9608
9561
|
},
|
|
9609
|
-
"
|
|
9610
|
-
"description": "
|
|
9562
|
+
"signInWithPassword": {
|
|
9563
|
+
"description": "Sign in with email and password.",
|
|
9611
9564
|
"parameters": {
|
|
9612
|
-
"
|
|
9565
|
+
"email": {
|
|
9613
9566
|
"type": "string",
|
|
9614
|
-
"description": "
|
|
9567
|
+
"description": "Parameter email"
|
|
9615
9568
|
},
|
|
9616
|
-
"
|
|
9617
|
-
"type": "
|
|
9618
|
-
"description": "
|
|
9569
|
+
"password": {
|
|
9570
|
+
"type": "string",
|
|
9571
|
+
"description": "Parameter password"
|
|
9619
9572
|
}
|
|
9620
9573
|
},
|
|
9621
9574
|
"required": [
|
|
9622
|
-
"
|
|
9575
|
+
"email",
|
|
9576
|
+
"password"
|
|
9623
9577
|
],
|
|
9624
|
-
"returns": "
|
|
9625
|
-
"examples": [
|
|
9626
|
-
{
|
|
9627
|
-
"language": "ts",
|
|
9628
|
-
"code": "const response = await openai.createCompletion('Once upon a time')"
|
|
9629
|
-
}
|
|
9630
|
-
]
|
|
9578
|
+
"returns": "void"
|
|
9631
9579
|
},
|
|
9632
|
-
"
|
|
9633
|
-
"description": "Create
|
|
9580
|
+
"signUp": {
|
|
9581
|
+
"description": "Create a new user account with email and password.",
|
|
9634
9582
|
"parameters": {
|
|
9635
|
-
"
|
|
9636
|
-
"type": "string
|
|
9637
|
-
"description": "
|
|
9583
|
+
"email": {
|
|
9584
|
+
"type": "string",
|
|
9585
|
+
"description": "Parameter email"
|
|
9638
9586
|
},
|
|
9639
|
-
"
|
|
9640
|
-
"type": "
|
|
9641
|
-
"description": "
|
|
9587
|
+
"password": {
|
|
9588
|
+
"type": "string",
|
|
9589
|
+
"description": "Parameter password"
|
|
9642
9590
|
}
|
|
9643
9591
|
},
|
|
9644
9592
|
"required": [
|
|
9645
|
-
"
|
|
9593
|
+
"email",
|
|
9594
|
+
"password"
|
|
9646
9595
|
],
|
|
9647
|
-
"returns": "
|
|
9648
|
-
"examples": [
|
|
9649
|
-
{
|
|
9650
|
-
"language": "ts",
|
|
9651
|
-
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
9652
|
-
}
|
|
9653
|
-
]
|
|
9596
|
+
"returns": "void"
|
|
9654
9597
|
},
|
|
9655
|
-
"
|
|
9656
|
-
"description": "
|
|
9598
|
+
"signOut": {
|
|
9599
|
+
"description": "Sign the current user out.",
|
|
9600
|
+
"parameters": {},
|
|
9601
|
+
"required": [],
|
|
9602
|
+
"returns": "void"
|
|
9603
|
+
},
|
|
9604
|
+
"getSession": {
|
|
9605
|
+
"description": "Get the current session, if any.",
|
|
9606
|
+
"parameters": {},
|
|
9607
|
+
"required": [],
|
|
9608
|
+
"returns": "void"
|
|
9609
|
+
},
|
|
9610
|
+
"getUser": {
|
|
9611
|
+
"description": "Get the current user, if any.",
|
|
9612
|
+
"parameters": {},
|
|
9613
|
+
"required": [],
|
|
9614
|
+
"returns": "void"
|
|
9615
|
+
},
|
|
9616
|
+
"invoke": {
|
|
9617
|
+
"description": "Invoke a Supabase Edge Function by name.",
|
|
9657
9618
|
"parameters": {
|
|
9658
|
-
"
|
|
9619
|
+
"name": {
|
|
9659
9620
|
"type": "string",
|
|
9660
|
-
"description": "
|
|
9621
|
+
"description": "Parameter name"
|
|
9661
9622
|
},
|
|
9662
|
-
"
|
|
9663
|
-
"type": "
|
|
9664
|
-
"description": "
|
|
9623
|
+
"body": {
|
|
9624
|
+
"type": "any",
|
|
9625
|
+
"description": "Parameter body"
|
|
9665
9626
|
}
|
|
9666
9627
|
},
|
|
9667
9628
|
"required": [
|
|
9668
|
-
"
|
|
9629
|
+
"name"
|
|
9669
9630
|
],
|
|
9670
|
-
"returns": "
|
|
9671
|
-
"examples": [
|
|
9672
|
-
{
|
|
9673
|
-
"language": "ts",
|
|
9674
|
-
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
9675
|
-
}
|
|
9676
|
-
]
|
|
9677
|
-
},
|
|
9678
|
-
"listModels": {
|
|
9679
|
-
"description": "List all available models.",
|
|
9680
|
-
"parameters": {},
|
|
9681
|
-
"required": [],
|
|
9682
|
-
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
9683
|
-
"examples": [
|
|
9684
|
-
{
|
|
9685
|
-
"language": "ts",
|
|
9686
|
-
"code": "const models = await openai.listModels()"
|
|
9687
|
-
}
|
|
9688
|
-
]
|
|
9631
|
+
"returns": "void"
|
|
9689
9632
|
},
|
|
9690
|
-
"
|
|
9691
|
-
"description": "
|
|
9633
|
+
"subscribe": {
|
|
9634
|
+
"description": "Subscribe to realtime changes on a Postgres table.",
|
|
9692
9635
|
"parameters": {
|
|
9693
|
-
"
|
|
9636
|
+
"channelName": {
|
|
9694
9637
|
"type": "string",
|
|
9695
|
-
"description": "
|
|
9638
|
+
"description": "A name for this subscription channel"
|
|
9696
9639
|
},
|
|
9697
|
-
"
|
|
9698
|
-
"type": "
|
|
9699
|
-
"description": "
|
|
9640
|
+
"table": {
|
|
9641
|
+
"type": "string",
|
|
9642
|
+
"description": "The table to listen to"
|
|
9643
|
+
},
|
|
9644
|
+
"callback": {
|
|
9645
|
+
"type": "(payload: any) => void",
|
|
9646
|
+
"description": "Called with the payload on each change"
|
|
9647
|
+
},
|
|
9648
|
+
"event": {
|
|
9649
|
+
"type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
|
|
9650
|
+
"description": "The event type to listen for (default: all changes)"
|
|
9700
9651
|
}
|
|
9701
9652
|
},
|
|
9702
9653
|
"required": [
|
|
9703
|
-
"
|
|
9654
|
+
"channelName",
|
|
9655
|
+
"table",
|
|
9656
|
+
"callback"
|
|
9704
9657
|
],
|
|
9705
|
-
"returns": "
|
|
9706
|
-
"examples": [
|
|
9707
|
-
{
|
|
9708
|
-
"language": "ts",
|
|
9709
|
-
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
9710
|
-
}
|
|
9711
|
-
]
|
|
9658
|
+
"returns": "RealtimeChannel"
|
|
9712
9659
|
},
|
|
9713
|
-
"
|
|
9714
|
-
"description": "
|
|
9660
|
+
"unsubscribe": {
|
|
9661
|
+
"description": "Unsubscribe and remove a realtime channel by name.",
|
|
9715
9662
|
"parameters": {
|
|
9716
|
-
"
|
|
9717
|
-
"type": "
|
|
9718
|
-
"description": "
|
|
9719
|
-
},
|
|
9720
|
-
"options": {
|
|
9721
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
9722
|
-
"description": "Additional completion parameters"
|
|
9663
|
+
"channelName": {
|
|
9664
|
+
"type": "string",
|
|
9665
|
+
"description": "The channel name to remove"
|
|
9723
9666
|
}
|
|
9724
9667
|
},
|
|
9725
9668
|
"required": [
|
|
9726
|
-
"
|
|
9669
|
+
"channelName"
|
|
9727
9670
|
],
|
|
9728
|
-
"returns": "
|
|
9729
|
-
"examples": [
|
|
9730
|
-
{
|
|
9731
|
-
"language": "ts",
|
|
9732
|
-
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
9733
|
-
}
|
|
9734
|
-
]
|
|
9735
|
-
}
|
|
9736
|
-
},
|
|
9737
|
-
"getters": {
|
|
9738
|
-
"defaultModel": {
|
|
9739
|
-
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
9740
|
-
"returns": "string"
|
|
9741
|
-
},
|
|
9742
|
-
"raw": {
|
|
9743
|
-
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
9744
|
-
"returns": "OpenAI"
|
|
9745
|
-
}
|
|
9746
|
-
},
|
|
9747
|
-
"events": {
|
|
9748
|
-
"connected": {
|
|
9749
|
-
"name": "connected",
|
|
9750
|
-
"description": "Event emitted by OpenAIClient",
|
|
9751
|
-
"arguments": {}
|
|
9671
|
+
"returns": "void"
|
|
9752
9672
|
},
|
|
9753
|
-
"
|
|
9754
|
-
"
|
|
9755
|
-
"
|
|
9756
|
-
"
|
|
9673
|
+
"unsubscribeAll": {
|
|
9674
|
+
"description": "Unsubscribe and remove all realtime channels.",
|
|
9675
|
+
"parameters": {},
|
|
9676
|
+
"required": [],
|
|
9677
|
+
"returns": "void"
|
|
9757
9678
|
},
|
|
9758
|
-
"
|
|
9759
|
-
"
|
|
9760
|
-
"
|
|
9761
|
-
"
|
|
9679
|
+
"connect": {
|
|
9680
|
+
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
9681
|
+
"parameters": {},
|
|
9682
|
+
"required": [],
|
|
9683
|
+
"returns": "void"
|
|
9762
9684
|
},
|
|
9763
|
-
"
|
|
9764
|
-
"
|
|
9765
|
-
"
|
|
9766
|
-
"
|
|
9685
|
+
"disconnect": {
|
|
9686
|
+
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
9687
|
+
"parameters": {},
|
|
9688
|
+
"required": [],
|
|
9689
|
+
"returns": "void"
|
|
9690
|
+
}
|
|
9691
|
+
},
|
|
9692
|
+
"getters": {
|
|
9693
|
+
"sdk": {
|
|
9694
|
+
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
9695
|
+
"returns": "SupabaseSDKClient<any, any>"
|
|
9767
9696
|
},
|
|
9768
|
-
"
|
|
9769
|
-
"
|
|
9770
|
-
"
|
|
9771
|
-
"arguments": {}
|
|
9697
|
+
"storage": {
|
|
9698
|
+
"description": "Returns the Supabase Storage client for managing buckets and files.",
|
|
9699
|
+
"returns": "any"
|
|
9772
9700
|
},
|
|
9773
|
-
"
|
|
9774
|
-
"
|
|
9775
|
-
"
|
|
9776
|
-
"arguments": {}
|
|
9701
|
+
"functions": {
|
|
9702
|
+
"description": "Returns the Supabase Functions client.",
|
|
9703
|
+
"returns": "any"
|
|
9777
9704
|
}
|
|
9778
9705
|
},
|
|
9706
|
+
"events": {},
|
|
9779
9707
|
"state": {},
|
|
9780
9708
|
"options": {},
|
|
9781
9709
|
"envVars": [],
|
|
9782
9710
|
"examples": [
|
|
9783
9711
|
{
|
|
9784
9712
|
"language": "ts",
|
|
9785
|
-
"code": "const
|
|
9713
|
+
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
9786
9714
|
}
|
|
9787
9715
|
]
|
|
9788
9716
|
});
|
|
@@ -9989,440 +9917,512 @@ setBuildTimeData('clients.elevenlabs', {
|
|
|
9989
9917
|
]
|
|
9990
9918
|
});
|
|
9991
9919
|
|
|
9992
|
-
setBuildTimeData('clients.
|
|
9993
|
-
"id": "clients.
|
|
9994
|
-
"description": "
|
|
9995
|
-
"shortcut": "clients.
|
|
9996
|
-
"className": "
|
|
9920
|
+
setBuildTimeData('clients.comfyui', {
|
|
9921
|
+
"id": "clients.comfyui",
|
|
9922
|
+
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
9923
|
+
"shortcut": "clients.comfyui",
|
|
9924
|
+
"className": "ComfyUIClient",
|
|
9997
9925
|
"methods": {
|
|
9998
|
-
"
|
|
9999
|
-
"description": "
|
|
9926
|
+
"queuePrompt": {
|
|
9927
|
+
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
10000
9928
|
"parameters": {
|
|
10001
|
-
"
|
|
9929
|
+
"prompt": {
|
|
9930
|
+
"type": "Record<string, any>",
|
|
9931
|
+
"description": "The API-format workflow object"
|
|
9932
|
+
},
|
|
9933
|
+
"clientId": {
|
|
10002
9934
|
"type": "string",
|
|
10003
|
-
"description": "
|
|
9935
|
+
"description": "Override the client ID for this request"
|
|
10004
9936
|
}
|
|
10005
9937
|
},
|
|
10006
9938
|
"required": [
|
|
10007
|
-
"
|
|
9939
|
+
"prompt"
|
|
10008
9940
|
],
|
|
10009
|
-
"returns": "
|
|
9941
|
+
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
9942
|
+
"examples": [
|
|
9943
|
+
{
|
|
9944
|
+
"language": "ts",
|
|
9945
|
+
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
9946
|
+
}
|
|
9947
|
+
]
|
|
10010
9948
|
},
|
|
10011
|
-
"
|
|
10012
|
-
"description": "
|
|
9949
|
+
"getQueue": {
|
|
9950
|
+
"description": "Get the current prompt queue status.",
|
|
9951
|
+
"parameters": {},
|
|
9952
|
+
"required": [],
|
|
9953
|
+
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
9954
|
+
},
|
|
9955
|
+
"getHistory": {
|
|
9956
|
+
"description": "Get execution history, optionally for a specific prompt.",
|
|
10013
9957
|
"parameters": {
|
|
10014
|
-
"
|
|
9958
|
+
"promptId": {
|
|
10015
9959
|
"type": "string",
|
|
10016
|
-
"description": "
|
|
10017
|
-
},
|
|
10018
|
-
"params": {
|
|
10019
|
-
"type": "Record<string, unknown>",
|
|
10020
|
-
"description": "Arguments to pass to the function"
|
|
10021
|
-
},
|
|
10022
|
-
"options": {
|
|
10023
|
-
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
10024
|
-
"description": "Optional settings (head, get, count)"
|
|
9960
|
+
"description": "If provided, returns history for this prompt only"
|
|
10025
9961
|
}
|
|
10026
9962
|
},
|
|
10027
|
-
"required": [
|
|
10028
|
-
|
|
10029
|
-
],
|
|
10030
|
-
"returns": "void"
|
|
9963
|
+
"required": [],
|
|
9964
|
+
"returns": "Promise<Record<string, any>>"
|
|
10031
9965
|
},
|
|
10032
|
-
"
|
|
10033
|
-
"description": "
|
|
9966
|
+
"getSystemStats": {
|
|
9967
|
+
"description": "Get system stats including GPU memory and queue info.",
|
|
9968
|
+
"parameters": {},
|
|
9969
|
+
"required": [],
|
|
9970
|
+
"returns": "Promise<any>"
|
|
9971
|
+
},
|
|
9972
|
+
"getObjectInfo": {
|
|
9973
|
+
"description": "Get node type info with input/output schemas.",
|
|
10034
9974
|
"parameters": {
|
|
10035
|
-
"
|
|
9975
|
+
"nodeClass": {
|
|
10036
9976
|
"type": "string",
|
|
10037
|
-
"description": "
|
|
9977
|
+
"description": "If provided, returns info for this node type only"
|
|
9978
|
+
}
|
|
9979
|
+
},
|
|
9980
|
+
"required": [],
|
|
9981
|
+
"returns": "Promise<any>"
|
|
9982
|
+
},
|
|
9983
|
+
"interrupt": {
|
|
9984
|
+
"description": "Interrupt the currently executing prompt.",
|
|
9985
|
+
"parameters": {},
|
|
9986
|
+
"required": [],
|
|
9987
|
+
"returns": "Promise<void>"
|
|
9988
|
+
},
|
|
9989
|
+
"getModels": {
|
|
9990
|
+
"description": "List available models, optionally filtered by type.",
|
|
9991
|
+
"parameters": {
|
|
9992
|
+
"type": {
|
|
9993
|
+
"type": "string",
|
|
9994
|
+
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
9995
|
+
}
|
|
9996
|
+
},
|
|
9997
|
+
"required": [],
|
|
9998
|
+
"returns": "Promise<string[]>"
|
|
9999
|
+
},
|
|
10000
|
+
"getEmbeddings": {
|
|
10001
|
+
"description": "List available embedding models.",
|
|
10002
|
+
"parameters": {},
|
|
10003
|
+
"required": [],
|
|
10004
|
+
"returns": "Promise<string[]>"
|
|
10005
|
+
},
|
|
10006
|
+
"uploadImage": {
|
|
10007
|
+
"description": "Upload an image to ComfyUI's input directory.",
|
|
10008
|
+
"parameters": {
|
|
10009
|
+
"file": {
|
|
10010
|
+
"type": "Buffer | Blob",
|
|
10011
|
+
"description": "The image data as Buffer or Blob"
|
|
10038
10012
|
},
|
|
10039
|
-
"
|
|
10013
|
+
"filename": {
|
|
10040
10014
|
"type": "string",
|
|
10041
|
-
"description": "
|
|
10015
|
+
"description": "File name for the upload"
|
|
10016
|
+
},
|
|
10017
|
+
"opts": {
|
|
10018
|
+
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
10019
|
+
"description": "Upload options (subfolder, type, overwrite)"
|
|
10042
10020
|
}
|
|
10043
10021
|
},
|
|
10044
10022
|
"required": [
|
|
10045
|
-
"
|
|
10046
|
-
"
|
|
10023
|
+
"file",
|
|
10024
|
+
"filename"
|
|
10047
10025
|
],
|
|
10048
|
-
"returns": "
|
|
10026
|
+
"returns": "Promise<any>"
|
|
10049
10027
|
},
|
|
10050
|
-
"
|
|
10051
|
-
"description": "
|
|
10028
|
+
"viewImage": {
|
|
10029
|
+
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
10052
10030
|
"parameters": {
|
|
10053
|
-
"
|
|
10031
|
+
"filename": {
|
|
10054
10032
|
"type": "string",
|
|
10055
|
-
"description": "
|
|
10033
|
+
"description": "The image filename"
|
|
10056
10034
|
},
|
|
10057
|
-
"
|
|
10058
|
-
"type": "
|
|
10059
|
-
"description": "
|
|
10035
|
+
"subfolder": {
|
|
10036
|
+
"type": "any",
|
|
10037
|
+
"description": "Subfolder within the output directory"
|
|
10038
|
+
},
|
|
10039
|
+
"type": {
|
|
10040
|
+
"type": "any",
|
|
10041
|
+
"description": "Image type ('output', 'input', 'temp')"
|
|
10060
10042
|
}
|
|
10061
10043
|
},
|
|
10062
10044
|
"required": [
|
|
10063
|
-
"
|
|
10064
|
-
"password"
|
|
10045
|
+
"filename"
|
|
10065
10046
|
],
|
|
10066
|
-
"returns": "
|
|
10067
|
-
},
|
|
10068
|
-
"signOut": {
|
|
10069
|
-
"description": "Sign the current user out.",
|
|
10070
|
-
"parameters": {},
|
|
10071
|
-
"required": [],
|
|
10072
|
-
"returns": "void"
|
|
10047
|
+
"returns": "Promise<Buffer>"
|
|
10073
10048
|
},
|
|
10074
|
-
"
|
|
10075
|
-
"description": "
|
|
10049
|
+
"connectWs": {
|
|
10050
|
+
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
10076
10051
|
"parameters": {},
|
|
10077
10052
|
"required": [],
|
|
10078
|
-
"returns": "void"
|
|
10053
|
+
"returns": "Promise<void>"
|
|
10079
10054
|
},
|
|
10080
|
-
"
|
|
10081
|
-
"description": "
|
|
10055
|
+
"disconnectWs": {
|
|
10056
|
+
"description": "Close the WebSocket connection.",
|
|
10082
10057
|
"parameters": {},
|
|
10083
10058
|
"required": [],
|
|
10084
10059
|
"returns": "void"
|
|
10085
10060
|
},
|
|
10086
|
-
"
|
|
10087
|
-
"description": "
|
|
10061
|
+
"toApiFormat": {
|
|
10062
|
+
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
10088
10063
|
"parameters": {
|
|
10089
|
-
"
|
|
10090
|
-
"type": "string",
|
|
10091
|
-
"description": "Parameter
|
|
10092
|
-
},
|
|
10093
|
-
"body": {
|
|
10094
|
-
"type": "any",
|
|
10095
|
-
"description": "Parameter body"
|
|
10064
|
+
"workflow": {
|
|
10065
|
+
"type": "Record<string, any>",
|
|
10066
|
+
"description": "Parameter workflow"
|
|
10096
10067
|
}
|
|
10097
10068
|
},
|
|
10098
10069
|
"required": [
|
|
10099
|
-
"
|
|
10070
|
+
"workflow"
|
|
10100
10071
|
],
|
|
10101
|
-
"returns": "
|
|
10072
|
+
"returns": "Promise<Record<string, any>>"
|
|
10102
10073
|
},
|
|
10103
|
-
"
|
|
10104
|
-
"description": "
|
|
10074
|
+
"runWorkflow": {
|
|
10075
|
+
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
10105
10076
|
"parameters": {
|
|
10106
|
-
"
|
|
10107
|
-
"type": "string",
|
|
10108
|
-
"description": "
|
|
10109
|
-
},
|
|
10110
|
-
"table": {
|
|
10111
|
-
"type": "string",
|
|
10112
|
-
"description": "The table to listen to"
|
|
10077
|
+
"workflow": {
|
|
10078
|
+
"type": "Record<string, any>",
|
|
10079
|
+
"description": "Parameter workflow"
|
|
10113
10080
|
},
|
|
10114
|
-
"
|
|
10115
|
-
"type": "
|
|
10116
|
-
"description": "
|
|
10081
|
+
"inputs": {
|
|
10082
|
+
"type": "Record<string, any>",
|
|
10083
|
+
"description": "Parameter inputs"
|
|
10117
10084
|
},
|
|
10118
|
-
"
|
|
10119
|
-
"type": "
|
|
10120
|
-
"description": "
|
|
10085
|
+
"options": {
|
|
10086
|
+
"type": "WorkflowRunOptions",
|
|
10087
|
+
"description": "Parameter options",
|
|
10088
|
+
"properties": {
|
|
10089
|
+
"poll": {
|
|
10090
|
+
"type": "boolean",
|
|
10091
|
+
"description": "Use polling instead of WebSocket for tracking execution"
|
|
10092
|
+
},
|
|
10093
|
+
"pollInterval": {
|
|
10094
|
+
"type": "number",
|
|
10095
|
+
"description": "Polling interval in ms (default 1000)"
|
|
10096
|
+
},
|
|
10097
|
+
"inputMap": {
|
|
10098
|
+
"type": "InputMapping",
|
|
10099
|
+
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
10100
|
+
},
|
|
10101
|
+
"outputDir": {
|
|
10102
|
+
"type": "string",
|
|
10103
|
+
"description": "If provided, output images are downloaded to this directory"
|
|
10104
|
+
}
|
|
10105
|
+
}
|
|
10121
10106
|
}
|
|
10122
10107
|
},
|
|
10123
10108
|
"required": [
|
|
10124
|
-
"
|
|
10125
|
-
"table",
|
|
10126
|
-
"callback"
|
|
10109
|
+
"workflow"
|
|
10127
10110
|
],
|
|
10128
|
-
"returns": "
|
|
10111
|
+
"returns": "Promise<WorkflowResult>"
|
|
10112
|
+
}
|
|
10113
|
+
},
|
|
10114
|
+
"getters": {
|
|
10115
|
+
"clientId": {
|
|
10116
|
+
"description": "The unique client ID used for WebSocket session tracking.",
|
|
10117
|
+
"returns": "string"
|
|
10129
10118
|
},
|
|
10130
|
-
"
|
|
10131
|
-
"description": "
|
|
10132
|
-
"
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
"
|
|
10139
|
-
|
|
10140
|
-
],
|
|
10141
|
-
"returns": "void"
|
|
10119
|
+
"wsURL": {
|
|
10120
|
+
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
10121
|
+
"returns": "string"
|
|
10122
|
+
}
|
|
10123
|
+
},
|
|
10124
|
+
"events": {
|
|
10125
|
+
"execution_start": {
|
|
10126
|
+
"name": "execution_start",
|
|
10127
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10128
|
+
"arguments": {}
|
|
10142
10129
|
},
|
|
10143
|
-
"
|
|
10144
|
-
"
|
|
10145
|
-
"
|
|
10146
|
-
"
|
|
10147
|
-
"returns": "void"
|
|
10130
|
+
"execution_complete": {
|
|
10131
|
+
"name": "execution_complete",
|
|
10132
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10133
|
+
"arguments": {}
|
|
10148
10134
|
},
|
|
10149
|
-
"
|
|
10150
|
-
"
|
|
10151
|
-
"
|
|
10152
|
-
"
|
|
10153
|
-
"returns": "void"
|
|
10135
|
+
"executing": {
|
|
10136
|
+
"name": "executing",
|
|
10137
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10138
|
+
"arguments": {}
|
|
10154
10139
|
},
|
|
10155
|
-
"
|
|
10156
|
-
"
|
|
10157
|
-
"
|
|
10158
|
-
"
|
|
10159
|
-
"returns": "void"
|
|
10160
|
-
}
|
|
10161
|
-
},
|
|
10162
|
-
"getters": {
|
|
10163
|
-
"sdk": {
|
|
10164
|
-
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
10165
|
-
"returns": "SupabaseSDKClient<any, any>"
|
|
10140
|
+
"progress": {
|
|
10141
|
+
"name": "progress",
|
|
10142
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10143
|
+
"arguments": {}
|
|
10166
10144
|
},
|
|
10167
|
-
"
|
|
10168
|
-
"
|
|
10169
|
-
"
|
|
10145
|
+
"executed": {
|
|
10146
|
+
"name": "executed",
|
|
10147
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10148
|
+
"arguments": {}
|
|
10170
10149
|
},
|
|
10171
|
-
"
|
|
10172
|
-
"
|
|
10173
|
-
"
|
|
10150
|
+
"execution_cached": {
|
|
10151
|
+
"name": "execution_cached",
|
|
10152
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10153
|
+
"arguments": {}
|
|
10154
|
+
},
|
|
10155
|
+
"execution_error": {
|
|
10156
|
+
"name": "execution_error",
|
|
10157
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10158
|
+
"arguments": {}
|
|
10174
10159
|
}
|
|
10175
10160
|
},
|
|
10176
|
-
"events": {},
|
|
10177
10161
|
"state": {},
|
|
10178
10162
|
"options": {},
|
|
10179
10163
|
"envVars": [],
|
|
10180
10164
|
"examples": [
|
|
10181
10165
|
{
|
|
10182
10166
|
"language": "ts",
|
|
10183
|
-
"code": "const
|
|
10167
|
+
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
10184
10168
|
}
|
|
10185
10169
|
]
|
|
10186
10170
|
});
|
|
10187
10171
|
|
|
10188
|
-
setBuildTimeData('clients.
|
|
10189
|
-
"id": "clients.
|
|
10190
|
-
"description": "
|
|
10191
|
-
"shortcut": "clients.
|
|
10192
|
-
"className": "
|
|
10172
|
+
setBuildTimeData('clients.openai', {
|
|
10173
|
+
"id": "clients.openai",
|
|
10174
|
+
"description": "OpenAI client — wraps the OpenAI SDK for chat completions, responses API, embeddings, and image generation. Provides convenience methods for common operations while tracking token usage and request counts. Supports both the Chat Completions API and the newer Responses API.",
|
|
10175
|
+
"shortcut": "clients.openai",
|
|
10176
|
+
"className": "OpenAIClient",
|
|
10193
10177
|
"methods": {
|
|
10194
|
-
"
|
|
10195
|
-
"description": "
|
|
10178
|
+
"connect": {
|
|
10179
|
+
"description": "Test the API connection by listing models.",
|
|
10180
|
+
"parameters": {},
|
|
10181
|
+
"required": [],
|
|
10182
|
+
"returns": "Promise<this>",
|
|
10183
|
+
"examples": [
|
|
10184
|
+
{
|
|
10185
|
+
"language": "ts",
|
|
10186
|
+
"code": "await openai.connect()"
|
|
10187
|
+
}
|
|
10188
|
+
]
|
|
10189
|
+
},
|
|
10190
|
+
"createChatCompletion": {
|
|
10191
|
+
"description": "Create a chat completion using the Chat Completions API.",
|
|
10192
|
+
"parameters": {
|
|
10193
|
+
"messages": {
|
|
10194
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
10195
|
+
"description": "Array of chat messages"
|
|
10196
|
+
},
|
|
10197
|
+
"options": {
|
|
10198
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
10199
|
+
"description": "Additional parameters for the completion"
|
|
10200
|
+
}
|
|
10201
|
+
},
|
|
10202
|
+
"required": [
|
|
10203
|
+
"messages"
|
|
10204
|
+
],
|
|
10205
|
+
"returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
|
|
10206
|
+
"examples": [
|
|
10207
|
+
{
|
|
10208
|
+
"language": "ts",
|
|
10209
|
+
"code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
|
|
10210
|
+
}
|
|
10211
|
+
]
|
|
10212
|
+
},
|
|
10213
|
+
"createResponse": {
|
|
10214
|
+
"description": "Create a response using the Responses API.",
|
|
10196
10215
|
"parameters": {
|
|
10197
|
-
"
|
|
10198
|
-
"type": "
|
|
10199
|
-
"description": "The
|
|
10216
|
+
"input": {
|
|
10217
|
+
"type": "OpenAI.Responses.ResponseInput | string",
|
|
10218
|
+
"description": "The input prompt or message array"
|
|
10200
10219
|
},
|
|
10201
|
-
"
|
|
10202
|
-
"type": "
|
|
10203
|
-
"description": "
|
|
10220
|
+
"options": {
|
|
10221
|
+
"type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
|
|
10222
|
+
"description": "Additional parameters for the response"
|
|
10204
10223
|
}
|
|
10205
10224
|
},
|
|
10206
10225
|
"required": [
|
|
10207
|
-
"
|
|
10226
|
+
"input"
|
|
10208
10227
|
],
|
|
10209
|
-
"returns": "Promise<
|
|
10228
|
+
"returns": "Promise<OpenAI.Responses.Response>",
|
|
10210
10229
|
"examples": [
|
|
10211
10230
|
{
|
|
10212
10231
|
"language": "ts",
|
|
10213
|
-
"code": "const
|
|
10232
|
+
"code": "const response = await openai.createResponse('Explain quantum computing')"
|
|
10214
10233
|
}
|
|
10215
10234
|
]
|
|
10216
10235
|
},
|
|
10217
|
-
"
|
|
10218
|
-
"description": "
|
|
10219
|
-
"parameters": {},
|
|
10220
|
-
"required": [],
|
|
10221
|
-
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
10222
|
-
},
|
|
10223
|
-
"getHistory": {
|
|
10224
|
-
"description": "Get execution history, optionally for a specific prompt.",
|
|
10236
|
+
"streamResponse": {
|
|
10237
|
+
"description": "Stream a response using the Responses API.",
|
|
10225
10238
|
"parameters": {
|
|
10226
|
-
"
|
|
10227
|
-
"type": "string",
|
|
10228
|
-
"description": "
|
|
10239
|
+
"input": {
|
|
10240
|
+
"type": "OpenAI.Responses.ResponseInput | string",
|
|
10241
|
+
"description": "The input prompt or message array"
|
|
10242
|
+
},
|
|
10243
|
+
"options": {
|
|
10244
|
+
"type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
|
|
10245
|
+
"description": "Additional parameters for the streaming response"
|
|
10229
10246
|
}
|
|
10230
10247
|
},
|
|
10231
|
-
"required": [
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
"
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
},
|
|
10240
|
-
"getObjectInfo": {
|
|
10241
|
-
"description": "Get node type info with input/output schemas.",
|
|
10242
|
-
"parameters": {
|
|
10243
|
-
"nodeClass": {
|
|
10244
|
-
"type": "string",
|
|
10245
|
-
"description": "If provided, returns info for this node type only"
|
|
10248
|
+
"required": [
|
|
10249
|
+
"input"
|
|
10250
|
+
],
|
|
10251
|
+
"returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
|
|
10252
|
+
"examples": [
|
|
10253
|
+
{
|
|
10254
|
+
"language": "ts",
|
|
10255
|
+
"code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
|
|
10246
10256
|
}
|
|
10247
|
-
|
|
10248
|
-
"required": [],
|
|
10249
|
-
"returns": "Promise<any>"
|
|
10250
|
-
},
|
|
10251
|
-
"interrupt": {
|
|
10252
|
-
"description": "Interrupt the currently executing prompt.",
|
|
10253
|
-
"parameters": {},
|
|
10254
|
-
"required": [],
|
|
10255
|
-
"returns": "Promise<void>"
|
|
10257
|
+
]
|
|
10256
10258
|
},
|
|
10257
|
-
"
|
|
10258
|
-
"description": "
|
|
10259
|
+
"createCompletion": {
|
|
10260
|
+
"description": "Create a legacy text completion.",
|
|
10259
10261
|
"parameters": {
|
|
10260
|
-
"
|
|
10262
|
+
"prompt": {
|
|
10261
10263
|
"type": "string",
|
|
10262
|
-
"description": "
|
|
10264
|
+
"description": "The text prompt to complete"
|
|
10265
|
+
},
|
|
10266
|
+
"options": {
|
|
10267
|
+
"type": "Partial<OpenAI.Completions.CompletionCreateParams>",
|
|
10268
|
+
"description": "Additional parameters for the completion"
|
|
10263
10269
|
}
|
|
10264
10270
|
},
|
|
10265
|
-
"required": [
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
"
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10271
|
+
"required": [
|
|
10272
|
+
"prompt"
|
|
10273
|
+
],
|
|
10274
|
+
"returns": "Promise<OpenAI.Completions.Completion>",
|
|
10275
|
+
"examples": [
|
|
10276
|
+
{
|
|
10277
|
+
"language": "ts",
|
|
10278
|
+
"code": "const response = await openai.createCompletion('Once upon a time')"
|
|
10279
|
+
}
|
|
10280
|
+
]
|
|
10273
10281
|
},
|
|
10274
|
-
"
|
|
10275
|
-
"description": "
|
|
10282
|
+
"createEmbedding": {
|
|
10283
|
+
"description": "Create text embeddings for semantic search or similarity comparisons.",
|
|
10276
10284
|
"parameters": {
|
|
10277
|
-
"
|
|
10278
|
-
"type": "
|
|
10279
|
-
"description": "
|
|
10280
|
-
},
|
|
10281
|
-
"filename": {
|
|
10282
|
-
"type": "string",
|
|
10283
|
-
"description": "File name for the upload"
|
|
10285
|
+
"input": {
|
|
10286
|
+
"type": "string | string[]",
|
|
10287
|
+
"description": "A string or array of strings to embed"
|
|
10284
10288
|
},
|
|
10285
|
-
"
|
|
10286
|
-
"type": "
|
|
10287
|
-
"description": "
|
|
10289
|
+
"options": {
|
|
10290
|
+
"type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
|
|
10291
|
+
"description": "Additional parameters (model, etc.)"
|
|
10288
10292
|
}
|
|
10289
10293
|
},
|
|
10290
10294
|
"required": [
|
|
10291
|
-
"
|
|
10292
|
-
"filename"
|
|
10295
|
+
"input"
|
|
10293
10296
|
],
|
|
10294
|
-
"returns": "Promise<
|
|
10297
|
+
"returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
|
|
10298
|
+
"examples": [
|
|
10299
|
+
{
|
|
10300
|
+
"language": "ts",
|
|
10301
|
+
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
10302
|
+
}
|
|
10303
|
+
]
|
|
10295
10304
|
},
|
|
10296
|
-
"
|
|
10297
|
-
"description": "
|
|
10305
|
+
"createImage": {
|
|
10306
|
+
"description": "Generate an image from a text prompt using DALL-E.",
|
|
10298
10307
|
"parameters": {
|
|
10299
|
-
"
|
|
10308
|
+
"prompt": {
|
|
10300
10309
|
"type": "string",
|
|
10301
|
-
"description": "
|
|
10302
|
-
},
|
|
10303
|
-
"subfolder": {
|
|
10304
|
-
"type": "any",
|
|
10305
|
-
"description": "Subfolder within the output directory"
|
|
10310
|
+
"description": "Description of the image to generate"
|
|
10306
10311
|
},
|
|
10307
|
-
"
|
|
10308
|
-
"type": "
|
|
10309
|
-
"description": "
|
|
10312
|
+
"options": {
|
|
10313
|
+
"type": "Partial<OpenAI.Images.ImageGenerateParams>",
|
|
10314
|
+
"description": "Additional parameters (size, n, etc.)"
|
|
10310
10315
|
}
|
|
10311
10316
|
},
|
|
10312
10317
|
"required": [
|
|
10313
|
-
"
|
|
10318
|
+
"prompt"
|
|
10314
10319
|
],
|
|
10315
|
-
"returns": "Promise<
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10320
|
+
"returns": "Promise<OpenAI.Images.ImagesResponse>",
|
|
10321
|
+
"examples": [
|
|
10322
|
+
{
|
|
10323
|
+
"language": "ts",
|
|
10324
|
+
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
10325
|
+
}
|
|
10326
|
+
]
|
|
10322
10327
|
},
|
|
10323
|
-
"
|
|
10324
|
-
"description": "
|
|
10328
|
+
"listModels": {
|
|
10329
|
+
"description": "List all available models.",
|
|
10325
10330
|
"parameters": {},
|
|
10326
10331
|
"required": [],
|
|
10327
|
-
"returns": "
|
|
10332
|
+
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
10333
|
+
"examples": [
|
|
10334
|
+
{
|
|
10335
|
+
"language": "ts",
|
|
10336
|
+
"code": "const models = await openai.listModels()"
|
|
10337
|
+
}
|
|
10338
|
+
]
|
|
10328
10339
|
},
|
|
10329
|
-
"
|
|
10330
|
-
"description": "
|
|
10340
|
+
"ask": {
|
|
10341
|
+
"description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
|
|
10331
10342
|
"parameters": {
|
|
10332
|
-
"
|
|
10333
|
-
"type": "
|
|
10334
|
-
"description": "
|
|
10343
|
+
"question": {
|
|
10344
|
+
"type": "string",
|
|
10345
|
+
"description": "The question to ask"
|
|
10346
|
+
},
|
|
10347
|
+
"options": {
|
|
10348
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
10349
|
+
"description": "Additional completion parameters"
|
|
10335
10350
|
}
|
|
10336
10351
|
},
|
|
10337
10352
|
"required": [
|
|
10338
|
-
"
|
|
10353
|
+
"question"
|
|
10339
10354
|
],
|
|
10340
|
-
"returns": "Promise<
|
|
10355
|
+
"returns": "Promise<string>",
|
|
10356
|
+
"examples": [
|
|
10357
|
+
{
|
|
10358
|
+
"language": "ts",
|
|
10359
|
+
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
10360
|
+
}
|
|
10361
|
+
]
|
|
10341
10362
|
},
|
|
10342
|
-
"
|
|
10343
|
-
"description": "
|
|
10363
|
+
"chat": {
|
|
10364
|
+
"description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
|
|
10344
10365
|
"parameters": {
|
|
10345
|
-
"
|
|
10346
|
-
"type": "
|
|
10347
|
-
"description": "
|
|
10348
|
-
},
|
|
10349
|
-
"inputs": {
|
|
10350
|
-
"type": "Record<string, any>",
|
|
10351
|
-
"description": "Parameter inputs"
|
|
10366
|
+
"messages": {
|
|
10367
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
10368
|
+
"description": "Array of chat messages"
|
|
10352
10369
|
},
|
|
10353
10370
|
"options": {
|
|
10354
|
-
"type": "
|
|
10355
|
-
"description": "
|
|
10356
|
-
"properties": {
|
|
10357
|
-
"poll": {
|
|
10358
|
-
"type": "boolean",
|
|
10359
|
-
"description": "Use polling instead of WebSocket for tracking execution"
|
|
10360
|
-
},
|
|
10361
|
-
"pollInterval": {
|
|
10362
|
-
"type": "number",
|
|
10363
|
-
"description": "Polling interval in ms (default 1000)"
|
|
10364
|
-
},
|
|
10365
|
-
"inputMap": {
|
|
10366
|
-
"type": "InputMapping",
|
|
10367
|
-
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
10368
|
-
},
|
|
10369
|
-
"outputDir": {
|
|
10370
|
-
"type": "string",
|
|
10371
|
-
"description": "If provided, output images are downloaded to this directory"
|
|
10372
|
-
}
|
|
10373
|
-
}
|
|
10371
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
10372
|
+
"description": "Additional completion parameters"
|
|
10374
10373
|
}
|
|
10375
10374
|
},
|
|
10376
10375
|
"required": [
|
|
10377
|
-
"
|
|
10376
|
+
"messages"
|
|
10378
10377
|
],
|
|
10379
|
-
"returns": "Promise<
|
|
10378
|
+
"returns": "Promise<string>",
|
|
10379
|
+
"examples": [
|
|
10380
|
+
{
|
|
10381
|
+
"language": "ts",
|
|
10382
|
+
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
10383
|
+
}
|
|
10384
|
+
]
|
|
10380
10385
|
}
|
|
10381
10386
|
},
|
|
10382
10387
|
"getters": {
|
|
10383
|
-
"
|
|
10384
|
-
"description": "The
|
|
10388
|
+
"defaultModel": {
|
|
10389
|
+
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
10385
10390
|
"returns": "string"
|
|
10386
10391
|
},
|
|
10387
|
-
"
|
|
10388
|
-
"description": "The
|
|
10389
|
-
"returns": "
|
|
10392
|
+
"raw": {
|
|
10393
|
+
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
10394
|
+
"returns": "OpenAI"
|
|
10390
10395
|
}
|
|
10391
10396
|
},
|
|
10392
10397
|
"events": {
|
|
10393
|
-
"
|
|
10394
|
-
"name": "
|
|
10395
|
-
"description": "Event emitted by
|
|
10396
|
-
"arguments": {}
|
|
10397
|
-
},
|
|
10398
|
-
"execution_complete": {
|
|
10399
|
-
"name": "execution_complete",
|
|
10400
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10398
|
+
"connected": {
|
|
10399
|
+
"name": "connected",
|
|
10400
|
+
"description": "Event emitted by OpenAIClient",
|
|
10401
10401
|
"arguments": {}
|
|
10402
10402
|
},
|
|
10403
|
-
"
|
|
10404
|
-
"name": "
|
|
10405
|
-
"description": "Event emitted by
|
|
10403
|
+
"failure": {
|
|
10404
|
+
"name": "failure",
|
|
10405
|
+
"description": "Event emitted by OpenAIClient",
|
|
10406
10406
|
"arguments": {}
|
|
10407
10407
|
},
|
|
10408
|
-
"
|
|
10409
|
-
"name": "
|
|
10410
|
-
"description": "Event emitted by
|
|
10408
|
+
"completion": {
|
|
10409
|
+
"name": "completion",
|
|
10410
|
+
"description": "Event emitted by OpenAIClient",
|
|
10411
10411
|
"arguments": {}
|
|
10412
10412
|
},
|
|
10413
|
-
"
|
|
10414
|
-
"name": "
|
|
10415
|
-
"description": "Event emitted by
|
|
10413
|
+
"embedding": {
|
|
10414
|
+
"name": "embedding",
|
|
10415
|
+
"description": "Event emitted by OpenAIClient",
|
|
10416
10416
|
"arguments": {}
|
|
10417
10417
|
},
|
|
10418
|
-
"
|
|
10419
|
-
"name": "
|
|
10420
|
-
"description": "Event emitted by
|
|
10418
|
+
"image": {
|
|
10419
|
+
"name": "image",
|
|
10420
|
+
"description": "Event emitted by OpenAIClient",
|
|
10421
10421
|
"arguments": {}
|
|
10422
10422
|
},
|
|
10423
|
-
"
|
|
10424
|
-
"name": "
|
|
10425
|
-
"description": "Event emitted by
|
|
10423
|
+
"models": {
|
|
10424
|
+
"name": "models",
|
|
10425
|
+
"description": "Event emitted by OpenAIClient",
|
|
10426
10426
|
"arguments": {}
|
|
10427
10427
|
}
|
|
10428
10428
|
},
|
|
@@ -10432,7 +10432,7 @@ setBuildTimeData('clients.comfyui', {
|
|
|
10432
10432
|
"examples": [
|
|
10433
10433
|
{
|
|
10434
10434
|
"language": "ts",
|
|
10435
|
-
"code": "const
|
|
10435
|
+
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
10436
10436
|
}
|
|
10437
10437
|
]
|
|
10438
10438
|
});
|
|
@@ -22978,269 +22978,197 @@ export const introspectionData = [
|
|
|
22978
22978
|
]
|
|
22979
22979
|
},
|
|
22980
22980
|
{
|
|
22981
|
-
"id": "clients.
|
|
22982
|
-
"description": "
|
|
22983
|
-
"shortcut": "clients.
|
|
22984
|
-
"className": "
|
|
22981
|
+
"id": "clients.supabase",
|
|
22982
|
+
"description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
|
|
22983
|
+
"shortcut": "clients.supabase",
|
|
22984
|
+
"className": "SupabaseClient",
|
|
22985
22985
|
"methods": {
|
|
22986
|
-
"
|
|
22987
|
-
"description": "
|
|
22988
|
-
"parameters": {},
|
|
22989
|
-
"required": [],
|
|
22990
|
-
"returns": "Promise<this>",
|
|
22991
|
-
"examples": [
|
|
22992
|
-
{
|
|
22993
|
-
"language": "ts",
|
|
22994
|
-
"code": "await openai.connect()"
|
|
22995
|
-
}
|
|
22996
|
-
]
|
|
22997
|
-
},
|
|
22998
|
-
"createChatCompletion": {
|
|
22999
|
-
"description": "Create a chat completion using the Chat Completions API.",
|
|
22986
|
+
"from": {
|
|
22987
|
+
"description": "Start a query on a Postgres table or view.",
|
|
23000
22988
|
"parameters": {
|
|
23001
|
-
"
|
|
23002
|
-
"type": "
|
|
23003
|
-
"description": "
|
|
23004
|
-
},
|
|
23005
|
-
"options": {
|
|
23006
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23007
|
-
"description": "Additional parameters for the completion"
|
|
22989
|
+
"table": {
|
|
22990
|
+
"type": "string",
|
|
22991
|
+
"description": "The table or view name to query"
|
|
23008
22992
|
}
|
|
23009
22993
|
},
|
|
23010
22994
|
"required": [
|
|
23011
|
-
"
|
|
22995
|
+
"table"
|
|
23012
22996
|
],
|
|
23013
|
-
"returns": "
|
|
23014
|
-
"examples": [
|
|
23015
|
-
{
|
|
23016
|
-
"language": "ts",
|
|
23017
|
-
"code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
|
|
23018
|
-
}
|
|
23019
|
-
]
|
|
22997
|
+
"returns": "void"
|
|
23020
22998
|
},
|
|
23021
|
-
"
|
|
23022
|
-
"description": "
|
|
22999
|
+
"rpc": {
|
|
23000
|
+
"description": "Call a Postgres function (RPC).",
|
|
23023
23001
|
"parameters": {
|
|
23024
|
-
"
|
|
23025
|
-
"type": "
|
|
23026
|
-
"description": "The
|
|
23002
|
+
"fn": {
|
|
23003
|
+
"type": "string",
|
|
23004
|
+
"description": "The function name"
|
|
23027
23005
|
},
|
|
23028
|
-
"
|
|
23029
|
-
"type": "
|
|
23030
|
-
"description": "
|
|
23031
|
-
}
|
|
23032
|
-
},
|
|
23033
|
-
"required": [
|
|
23034
|
-
"input"
|
|
23035
|
-
],
|
|
23036
|
-
"returns": "Promise<OpenAI.Responses.Response>",
|
|
23037
|
-
"examples": [
|
|
23038
|
-
{
|
|
23039
|
-
"language": "ts",
|
|
23040
|
-
"code": "const response = await openai.createResponse('Explain quantum computing')"
|
|
23041
|
-
}
|
|
23042
|
-
]
|
|
23043
|
-
},
|
|
23044
|
-
"streamResponse": {
|
|
23045
|
-
"description": "Stream a response using the Responses API.",
|
|
23046
|
-
"parameters": {
|
|
23047
|
-
"input": {
|
|
23048
|
-
"type": "OpenAI.Responses.ResponseInput | string",
|
|
23049
|
-
"description": "The input prompt or message array"
|
|
23006
|
+
"params": {
|
|
23007
|
+
"type": "Record<string, unknown>",
|
|
23008
|
+
"description": "Arguments to pass to the function"
|
|
23050
23009
|
},
|
|
23051
23010
|
"options": {
|
|
23052
|
-
"type": "
|
|
23053
|
-
"description": "
|
|
23011
|
+
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
23012
|
+
"description": "Optional settings (head, get, count)"
|
|
23054
23013
|
}
|
|
23055
23014
|
},
|
|
23056
23015
|
"required": [
|
|
23057
|
-
"
|
|
23016
|
+
"fn"
|
|
23058
23017
|
],
|
|
23059
|
-
"returns": "
|
|
23060
|
-
"examples": [
|
|
23061
|
-
{
|
|
23062
|
-
"language": "ts",
|
|
23063
|
-
"code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
|
|
23064
|
-
}
|
|
23065
|
-
]
|
|
23018
|
+
"returns": "void"
|
|
23066
23019
|
},
|
|
23067
|
-
"
|
|
23068
|
-
"description": "
|
|
23020
|
+
"signInWithPassword": {
|
|
23021
|
+
"description": "Sign in with email and password.",
|
|
23069
23022
|
"parameters": {
|
|
23070
|
-
"
|
|
23023
|
+
"email": {
|
|
23071
23024
|
"type": "string",
|
|
23072
|
-
"description": "
|
|
23025
|
+
"description": "Parameter email"
|
|
23073
23026
|
},
|
|
23074
|
-
"
|
|
23075
|
-
"type": "
|
|
23076
|
-
"description": "
|
|
23027
|
+
"password": {
|
|
23028
|
+
"type": "string",
|
|
23029
|
+
"description": "Parameter password"
|
|
23077
23030
|
}
|
|
23078
23031
|
},
|
|
23079
23032
|
"required": [
|
|
23080
|
-
"
|
|
23033
|
+
"email",
|
|
23034
|
+
"password"
|
|
23081
23035
|
],
|
|
23082
|
-
"returns": "
|
|
23083
|
-
"examples": [
|
|
23084
|
-
{
|
|
23085
|
-
"language": "ts",
|
|
23086
|
-
"code": "const response = await openai.createCompletion('Once upon a time')"
|
|
23087
|
-
}
|
|
23088
|
-
]
|
|
23036
|
+
"returns": "void"
|
|
23089
23037
|
},
|
|
23090
|
-
"
|
|
23091
|
-
"description": "Create
|
|
23038
|
+
"signUp": {
|
|
23039
|
+
"description": "Create a new user account with email and password.",
|
|
23092
23040
|
"parameters": {
|
|
23093
|
-
"
|
|
23094
|
-
"type": "string
|
|
23095
|
-
"description": "
|
|
23041
|
+
"email": {
|
|
23042
|
+
"type": "string",
|
|
23043
|
+
"description": "Parameter email"
|
|
23096
23044
|
},
|
|
23097
|
-
"
|
|
23098
|
-
"type": "
|
|
23099
|
-
"description": "
|
|
23045
|
+
"password": {
|
|
23046
|
+
"type": "string",
|
|
23047
|
+
"description": "Parameter password"
|
|
23100
23048
|
}
|
|
23101
23049
|
},
|
|
23102
23050
|
"required": [
|
|
23103
|
-
"
|
|
23051
|
+
"email",
|
|
23052
|
+
"password"
|
|
23104
23053
|
],
|
|
23105
|
-
"returns": "
|
|
23106
|
-
"examples": [
|
|
23107
|
-
{
|
|
23108
|
-
"language": "ts",
|
|
23109
|
-
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
23110
|
-
}
|
|
23111
|
-
]
|
|
23054
|
+
"returns": "void"
|
|
23112
23055
|
},
|
|
23113
|
-
"
|
|
23114
|
-
"description": "
|
|
23056
|
+
"signOut": {
|
|
23057
|
+
"description": "Sign the current user out.",
|
|
23058
|
+
"parameters": {},
|
|
23059
|
+
"required": [],
|
|
23060
|
+
"returns": "void"
|
|
23061
|
+
},
|
|
23062
|
+
"getSession": {
|
|
23063
|
+
"description": "Get the current session, if any.",
|
|
23064
|
+
"parameters": {},
|
|
23065
|
+
"required": [],
|
|
23066
|
+
"returns": "void"
|
|
23067
|
+
},
|
|
23068
|
+
"getUser": {
|
|
23069
|
+
"description": "Get the current user, if any.",
|
|
23070
|
+
"parameters": {},
|
|
23071
|
+
"required": [],
|
|
23072
|
+
"returns": "void"
|
|
23073
|
+
},
|
|
23074
|
+
"invoke": {
|
|
23075
|
+
"description": "Invoke a Supabase Edge Function by name.",
|
|
23115
23076
|
"parameters": {
|
|
23116
|
-
"
|
|
23077
|
+
"name": {
|
|
23117
23078
|
"type": "string",
|
|
23118
|
-
"description": "
|
|
23079
|
+
"description": "Parameter name"
|
|
23119
23080
|
},
|
|
23120
|
-
"
|
|
23121
|
-
"type": "
|
|
23122
|
-
"description": "
|
|
23081
|
+
"body": {
|
|
23082
|
+
"type": "any",
|
|
23083
|
+
"description": "Parameter body"
|
|
23123
23084
|
}
|
|
23124
23085
|
},
|
|
23125
23086
|
"required": [
|
|
23126
|
-
"
|
|
23087
|
+
"name"
|
|
23127
23088
|
],
|
|
23128
|
-
"returns": "
|
|
23129
|
-
"examples": [
|
|
23130
|
-
{
|
|
23131
|
-
"language": "ts",
|
|
23132
|
-
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
23133
|
-
}
|
|
23134
|
-
]
|
|
23135
|
-
},
|
|
23136
|
-
"listModels": {
|
|
23137
|
-
"description": "List all available models.",
|
|
23138
|
-
"parameters": {},
|
|
23139
|
-
"required": [],
|
|
23140
|
-
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
23141
|
-
"examples": [
|
|
23142
|
-
{
|
|
23143
|
-
"language": "ts",
|
|
23144
|
-
"code": "const models = await openai.listModels()"
|
|
23145
|
-
}
|
|
23146
|
-
]
|
|
23089
|
+
"returns": "void"
|
|
23147
23090
|
},
|
|
23148
|
-
"
|
|
23149
|
-
"description": "
|
|
23091
|
+
"subscribe": {
|
|
23092
|
+
"description": "Subscribe to realtime changes on a Postgres table.",
|
|
23150
23093
|
"parameters": {
|
|
23151
|
-
"
|
|
23094
|
+
"channelName": {
|
|
23152
23095
|
"type": "string",
|
|
23153
|
-
"description": "
|
|
23096
|
+
"description": "A name for this subscription channel"
|
|
23097
|
+
},
|
|
23098
|
+
"table": {
|
|
23099
|
+
"type": "string",
|
|
23100
|
+
"description": "The table to listen to"
|
|
23154
23101
|
},
|
|
23155
|
-
"
|
|
23156
|
-
"type": "
|
|
23157
|
-
"description": "
|
|
23102
|
+
"callback": {
|
|
23103
|
+
"type": "(payload: any) => void",
|
|
23104
|
+
"description": "Called with the payload on each change"
|
|
23105
|
+
},
|
|
23106
|
+
"event": {
|
|
23107
|
+
"type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
|
|
23108
|
+
"description": "The event type to listen for (default: all changes)"
|
|
23158
23109
|
}
|
|
23159
23110
|
},
|
|
23160
23111
|
"required": [
|
|
23161
|
-
"
|
|
23112
|
+
"channelName",
|
|
23113
|
+
"table",
|
|
23114
|
+
"callback"
|
|
23162
23115
|
],
|
|
23163
|
-
"returns": "
|
|
23164
|
-
"examples": [
|
|
23165
|
-
{
|
|
23166
|
-
"language": "ts",
|
|
23167
|
-
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
23168
|
-
}
|
|
23169
|
-
]
|
|
23116
|
+
"returns": "RealtimeChannel"
|
|
23170
23117
|
},
|
|
23171
|
-
"
|
|
23172
|
-
"description": "
|
|
23118
|
+
"unsubscribe": {
|
|
23119
|
+
"description": "Unsubscribe and remove a realtime channel by name.",
|
|
23173
23120
|
"parameters": {
|
|
23174
|
-
"
|
|
23175
|
-
"type": "
|
|
23176
|
-
"description": "
|
|
23177
|
-
},
|
|
23178
|
-
"options": {
|
|
23179
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23180
|
-
"description": "Additional completion parameters"
|
|
23121
|
+
"channelName": {
|
|
23122
|
+
"type": "string",
|
|
23123
|
+
"description": "The channel name to remove"
|
|
23181
23124
|
}
|
|
23182
23125
|
},
|
|
23183
23126
|
"required": [
|
|
23184
|
-
"
|
|
23127
|
+
"channelName"
|
|
23185
23128
|
],
|
|
23186
|
-
"returns": "
|
|
23187
|
-
"examples": [
|
|
23188
|
-
{
|
|
23189
|
-
"language": "ts",
|
|
23190
|
-
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
23191
|
-
}
|
|
23192
|
-
]
|
|
23193
|
-
}
|
|
23194
|
-
},
|
|
23195
|
-
"getters": {
|
|
23196
|
-
"defaultModel": {
|
|
23197
|
-
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
23198
|
-
"returns": "string"
|
|
23199
|
-
},
|
|
23200
|
-
"raw": {
|
|
23201
|
-
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
23202
|
-
"returns": "OpenAI"
|
|
23203
|
-
}
|
|
23204
|
-
},
|
|
23205
|
-
"events": {
|
|
23206
|
-
"connected": {
|
|
23207
|
-
"name": "connected",
|
|
23208
|
-
"description": "Event emitted by OpenAIClient",
|
|
23209
|
-
"arguments": {}
|
|
23129
|
+
"returns": "void"
|
|
23210
23130
|
},
|
|
23211
|
-
"
|
|
23212
|
-
"
|
|
23213
|
-
"
|
|
23214
|
-
"
|
|
23131
|
+
"unsubscribeAll": {
|
|
23132
|
+
"description": "Unsubscribe and remove all realtime channels.",
|
|
23133
|
+
"parameters": {},
|
|
23134
|
+
"required": [],
|
|
23135
|
+
"returns": "void"
|
|
23215
23136
|
},
|
|
23216
|
-
"
|
|
23217
|
-
"
|
|
23218
|
-
"
|
|
23219
|
-
"
|
|
23137
|
+
"connect": {
|
|
23138
|
+
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
23139
|
+
"parameters": {},
|
|
23140
|
+
"required": [],
|
|
23141
|
+
"returns": "void"
|
|
23220
23142
|
},
|
|
23221
|
-
"
|
|
23222
|
-
"
|
|
23223
|
-
"
|
|
23224
|
-
"
|
|
23143
|
+
"disconnect": {
|
|
23144
|
+
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
23145
|
+
"parameters": {},
|
|
23146
|
+
"required": [],
|
|
23147
|
+
"returns": "void"
|
|
23148
|
+
}
|
|
23149
|
+
},
|
|
23150
|
+
"getters": {
|
|
23151
|
+
"sdk": {
|
|
23152
|
+
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
23153
|
+
"returns": "SupabaseSDKClient<any, any>"
|
|
23225
23154
|
},
|
|
23226
|
-
"
|
|
23227
|
-
"
|
|
23228
|
-
"
|
|
23229
|
-
"arguments": {}
|
|
23155
|
+
"storage": {
|
|
23156
|
+
"description": "Returns the Supabase Storage client for managing buckets and files.",
|
|
23157
|
+
"returns": "any"
|
|
23230
23158
|
},
|
|
23231
|
-
"
|
|
23232
|
-
"
|
|
23233
|
-
"
|
|
23234
|
-
"arguments": {}
|
|
23159
|
+
"functions": {
|
|
23160
|
+
"description": "Returns the Supabase Functions client.",
|
|
23161
|
+
"returns": "any"
|
|
23235
23162
|
}
|
|
23236
23163
|
},
|
|
23164
|
+
"events": {},
|
|
23237
23165
|
"state": {},
|
|
23238
23166
|
"options": {},
|
|
23239
23167
|
"envVars": [],
|
|
23240
23168
|
"examples": [
|
|
23241
23169
|
{
|
|
23242
23170
|
"language": "ts",
|
|
23243
|
-
"code": "const
|
|
23171
|
+
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
23244
23172
|
}
|
|
23245
23173
|
]
|
|
23246
23174
|
},
|
|
@@ -23446,438 +23374,510 @@ export const introspectionData = [
|
|
|
23446
23374
|
]
|
|
23447
23375
|
},
|
|
23448
23376
|
{
|
|
23449
|
-
"id": "clients.
|
|
23450
|
-
"description": "
|
|
23451
|
-
"shortcut": "clients.
|
|
23452
|
-
"className": "
|
|
23377
|
+
"id": "clients.comfyui",
|
|
23378
|
+
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
23379
|
+
"shortcut": "clients.comfyui",
|
|
23380
|
+
"className": "ComfyUIClient",
|
|
23453
23381
|
"methods": {
|
|
23454
|
-
"
|
|
23455
|
-
"description": "
|
|
23382
|
+
"queuePrompt": {
|
|
23383
|
+
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
23456
23384
|
"parameters": {
|
|
23457
|
-
"
|
|
23385
|
+
"prompt": {
|
|
23386
|
+
"type": "Record<string, any>",
|
|
23387
|
+
"description": "The API-format workflow object"
|
|
23388
|
+
},
|
|
23389
|
+
"clientId": {
|
|
23458
23390
|
"type": "string",
|
|
23459
|
-
"description": "
|
|
23391
|
+
"description": "Override the client ID for this request"
|
|
23460
23392
|
}
|
|
23461
23393
|
},
|
|
23462
23394
|
"required": [
|
|
23463
|
-
"
|
|
23395
|
+
"prompt"
|
|
23464
23396
|
],
|
|
23465
|
-
"returns": "
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
"fn": {
|
|
23471
|
-
"type": "string",
|
|
23472
|
-
"description": "The function name"
|
|
23473
|
-
},
|
|
23474
|
-
"params": {
|
|
23475
|
-
"type": "Record<string, unknown>",
|
|
23476
|
-
"description": "Arguments to pass to the function"
|
|
23477
|
-
},
|
|
23478
|
-
"options": {
|
|
23479
|
-
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
23480
|
-
"description": "Optional settings (head, get, count)"
|
|
23397
|
+
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
23398
|
+
"examples": [
|
|
23399
|
+
{
|
|
23400
|
+
"language": "ts",
|
|
23401
|
+
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
23481
23402
|
}
|
|
23482
|
-
|
|
23483
|
-
"required": [
|
|
23484
|
-
"fn"
|
|
23485
|
-
],
|
|
23486
|
-
"returns": "void"
|
|
23403
|
+
]
|
|
23487
23404
|
},
|
|
23488
|
-
"
|
|
23489
|
-
"description": "
|
|
23490
|
-
"parameters": {
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
"description": "Parameter email"
|
|
23494
|
-
},
|
|
23495
|
-
"password": {
|
|
23496
|
-
"type": "string",
|
|
23497
|
-
"description": "Parameter password"
|
|
23498
|
-
}
|
|
23499
|
-
},
|
|
23500
|
-
"required": [
|
|
23501
|
-
"email",
|
|
23502
|
-
"password"
|
|
23503
|
-
],
|
|
23504
|
-
"returns": "void"
|
|
23405
|
+
"getQueue": {
|
|
23406
|
+
"description": "Get the current prompt queue status.",
|
|
23407
|
+
"parameters": {},
|
|
23408
|
+
"required": [],
|
|
23409
|
+
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
23505
23410
|
},
|
|
23506
|
-
"
|
|
23507
|
-
"description": "
|
|
23411
|
+
"getHistory": {
|
|
23412
|
+
"description": "Get execution history, optionally for a specific prompt.",
|
|
23508
23413
|
"parameters": {
|
|
23509
|
-
"
|
|
23510
|
-
"type": "string",
|
|
23511
|
-
"description": "Parameter email"
|
|
23512
|
-
},
|
|
23513
|
-
"password": {
|
|
23414
|
+
"promptId": {
|
|
23514
23415
|
"type": "string",
|
|
23515
|
-
"description": "
|
|
23416
|
+
"description": "If provided, returns history for this prompt only"
|
|
23516
23417
|
}
|
|
23517
23418
|
},
|
|
23518
|
-
"required": [
|
|
23519
|
-
|
|
23520
|
-
"password"
|
|
23521
|
-
],
|
|
23522
|
-
"returns": "void"
|
|
23419
|
+
"required": [],
|
|
23420
|
+
"returns": "Promise<Record<string, any>>"
|
|
23523
23421
|
},
|
|
23524
|
-
"
|
|
23525
|
-
"description": "
|
|
23422
|
+
"getSystemStats": {
|
|
23423
|
+
"description": "Get system stats including GPU memory and queue info.",
|
|
23526
23424
|
"parameters": {},
|
|
23527
23425
|
"required": [],
|
|
23528
|
-
"returns": "
|
|
23426
|
+
"returns": "Promise<any>"
|
|
23529
23427
|
},
|
|
23530
|
-
"
|
|
23531
|
-
"description": "Get
|
|
23532
|
-
"parameters": {
|
|
23428
|
+
"getObjectInfo": {
|
|
23429
|
+
"description": "Get node type info with input/output schemas.",
|
|
23430
|
+
"parameters": {
|
|
23431
|
+
"nodeClass": {
|
|
23432
|
+
"type": "string",
|
|
23433
|
+
"description": "If provided, returns info for this node type only"
|
|
23434
|
+
}
|
|
23435
|
+
},
|
|
23533
23436
|
"required": [],
|
|
23534
|
-
"returns": "
|
|
23437
|
+
"returns": "Promise<any>"
|
|
23535
23438
|
},
|
|
23536
|
-
"
|
|
23537
|
-
"description": "
|
|
23439
|
+
"interrupt": {
|
|
23440
|
+
"description": "Interrupt the currently executing prompt.",
|
|
23538
23441
|
"parameters": {},
|
|
23539
23442
|
"required": [],
|
|
23540
|
-
"returns": "void"
|
|
23443
|
+
"returns": "Promise<void>"
|
|
23541
23444
|
},
|
|
23542
|
-
"
|
|
23543
|
-
"description": "
|
|
23445
|
+
"getModels": {
|
|
23446
|
+
"description": "List available models, optionally filtered by type.",
|
|
23544
23447
|
"parameters": {
|
|
23545
|
-
"
|
|
23448
|
+
"type": {
|
|
23546
23449
|
"type": "string",
|
|
23547
|
-
"description": "
|
|
23548
|
-
},
|
|
23549
|
-
"body": {
|
|
23550
|
-
"type": "any",
|
|
23551
|
-
"description": "Parameter body"
|
|
23450
|
+
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
23552
23451
|
}
|
|
23553
23452
|
},
|
|
23554
|
-
"required": [
|
|
23555
|
-
|
|
23556
|
-
],
|
|
23557
|
-
"returns": "void"
|
|
23453
|
+
"required": [],
|
|
23454
|
+
"returns": "Promise<string[]>"
|
|
23558
23455
|
},
|
|
23559
|
-
"
|
|
23560
|
-
"description": "
|
|
23456
|
+
"getEmbeddings": {
|
|
23457
|
+
"description": "List available embedding models.",
|
|
23458
|
+
"parameters": {},
|
|
23459
|
+
"required": [],
|
|
23460
|
+
"returns": "Promise<string[]>"
|
|
23461
|
+
},
|
|
23462
|
+
"uploadImage": {
|
|
23463
|
+
"description": "Upload an image to ComfyUI's input directory.",
|
|
23561
23464
|
"parameters": {
|
|
23562
|
-
"
|
|
23563
|
-
"type": "
|
|
23564
|
-
"description": "
|
|
23465
|
+
"file": {
|
|
23466
|
+
"type": "Buffer | Blob",
|
|
23467
|
+
"description": "The image data as Buffer or Blob"
|
|
23565
23468
|
},
|
|
23566
|
-
"
|
|
23469
|
+
"filename": {
|
|
23567
23470
|
"type": "string",
|
|
23568
|
-
"description": "
|
|
23569
|
-
},
|
|
23570
|
-
"callback": {
|
|
23571
|
-
"type": "(payload: any) => void",
|
|
23572
|
-
"description": "Called with the payload on each change"
|
|
23471
|
+
"description": "File name for the upload"
|
|
23573
23472
|
},
|
|
23574
|
-
"
|
|
23575
|
-
"type": "
|
|
23576
|
-
"description": "
|
|
23473
|
+
"opts": {
|
|
23474
|
+
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
23475
|
+
"description": "Upload options (subfolder, type, overwrite)"
|
|
23577
23476
|
}
|
|
23578
23477
|
},
|
|
23579
23478
|
"required": [
|
|
23580
|
-
"
|
|
23581
|
-
"
|
|
23582
|
-
"callback"
|
|
23479
|
+
"file",
|
|
23480
|
+
"filename"
|
|
23583
23481
|
],
|
|
23584
|
-
"returns": "
|
|
23482
|
+
"returns": "Promise<any>"
|
|
23585
23483
|
},
|
|
23586
|
-
"
|
|
23587
|
-
"description": "
|
|
23484
|
+
"viewImage": {
|
|
23485
|
+
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
23588
23486
|
"parameters": {
|
|
23589
|
-
"
|
|
23487
|
+
"filename": {
|
|
23590
23488
|
"type": "string",
|
|
23591
|
-
"description": "The
|
|
23489
|
+
"description": "The image filename"
|
|
23490
|
+
},
|
|
23491
|
+
"subfolder": {
|
|
23492
|
+
"type": "any",
|
|
23493
|
+
"description": "Subfolder within the output directory"
|
|
23494
|
+
},
|
|
23495
|
+
"type": {
|
|
23496
|
+
"type": "any",
|
|
23497
|
+
"description": "Image type ('output', 'input', 'temp')"
|
|
23592
23498
|
}
|
|
23593
23499
|
},
|
|
23594
23500
|
"required": [
|
|
23595
|
-
"
|
|
23501
|
+
"filename"
|
|
23596
23502
|
],
|
|
23597
|
-
"returns": "
|
|
23503
|
+
"returns": "Promise<Buffer>"
|
|
23598
23504
|
},
|
|
23599
|
-
"
|
|
23600
|
-
"description": "
|
|
23505
|
+
"connectWs": {
|
|
23506
|
+
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
23601
23507
|
"parameters": {},
|
|
23602
23508
|
"required": [],
|
|
23603
|
-
"returns": "void"
|
|
23509
|
+
"returns": "Promise<void>"
|
|
23604
23510
|
},
|
|
23605
|
-
"
|
|
23606
|
-
"description": "
|
|
23511
|
+
"disconnectWs": {
|
|
23512
|
+
"description": "Close the WebSocket connection.",
|
|
23607
23513
|
"parameters": {},
|
|
23608
23514
|
"required": [],
|
|
23609
23515
|
"returns": "void"
|
|
23610
23516
|
},
|
|
23611
|
-
"
|
|
23612
|
-
"description": "
|
|
23613
|
-
"parameters": {
|
|
23614
|
-
|
|
23615
|
-
|
|
23517
|
+
"toApiFormat": {
|
|
23518
|
+
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
23519
|
+
"parameters": {
|
|
23520
|
+
"workflow": {
|
|
23521
|
+
"type": "Record<string, any>",
|
|
23522
|
+
"description": "Parameter workflow"
|
|
23523
|
+
}
|
|
23524
|
+
},
|
|
23525
|
+
"required": [
|
|
23526
|
+
"workflow"
|
|
23527
|
+
],
|
|
23528
|
+
"returns": "Promise<Record<string, any>>"
|
|
23529
|
+
},
|
|
23530
|
+
"runWorkflow": {
|
|
23531
|
+
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
23532
|
+
"parameters": {
|
|
23533
|
+
"workflow": {
|
|
23534
|
+
"type": "Record<string, any>",
|
|
23535
|
+
"description": "Parameter workflow"
|
|
23536
|
+
},
|
|
23537
|
+
"inputs": {
|
|
23538
|
+
"type": "Record<string, any>",
|
|
23539
|
+
"description": "Parameter inputs"
|
|
23540
|
+
},
|
|
23541
|
+
"options": {
|
|
23542
|
+
"type": "WorkflowRunOptions",
|
|
23543
|
+
"description": "Parameter options",
|
|
23544
|
+
"properties": {
|
|
23545
|
+
"poll": {
|
|
23546
|
+
"type": "boolean",
|
|
23547
|
+
"description": "Use polling instead of WebSocket for tracking execution"
|
|
23548
|
+
},
|
|
23549
|
+
"pollInterval": {
|
|
23550
|
+
"type": "number",
|
|
23551
|
+
"description": "Polling interval in ms (default 1000)"
|
|
23552
|
+
},
|
|
23553
|
+
"inputMap": {
|
|
23554
|
+
"type": "InputMapping",
|
|
23555
|
+
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
23556
|
+
},
|
|
23557
|
+
"outputDir": {
|
|
23558
|
+
"type": "string",
|
|
23559
|
+
"description": "If provided, output images are downloaded to this directory"
|
|
23560
|
+
}
|
|
23561
|
+
}
|
|
23562
|
+
}
|
|
23563
|
+
},
|
|
23564
|
+
"required": [
|
|
23565
|
+
"workflow"
|
|
23566
|
+
],
|
|
23567
|
+
"returns": "Promise<WorkflowResult>"
|
|
23616
23568
|
}
|
|
23617
23569
|
},
|
|
23618
23570
|
"getters": {
|
|
23619
|
-
"
|
|
23620
|
-
"description": "
|
|
23621
|
-
"returns": "
|
|
23571
|
+
"clientId": {
|
|
23572
|
+
"description": "The unique client ID used for WebSocket session tracking.",
|
|
23573
|
+
"returns": "string"
|
|
23622
23574
|
},
|
|
23623
|
-
"
|
|
23624
|
-
"description": "
|
|
23625
|
-
"returns": "
|
|
23575
|
+
"wsURL": {
|
|
23576
|
+
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
23577
|
+
"returns": "string"
|
|
23578
|
+
}
|
|
23579
|
+
},
|
|
23580
|
+
"events": {
|
|
23581
|
+
"execution_start": {
|
|
23582
|
+
"name": "execution_start",
|
|
23583
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23584
|
+
"arguments": {}
|
|
23626
23585
|
},
|
|
23627
|
-
"
|
|
23628
|
-
"
|
|
23629
|
-
"
|
|
23586
|
+
"execution_complete": {
|
|
23587
|
+
"name": "execution_complete",
|
|
23588
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23589
|
+
"arguments": {}
|
|
23590
|
+
},
|
|
23591
|
+
"executing": {
|
|
23592
|
+
"name": "executing",
|
|
23593
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23594
|
+
"arguments": {}
|
|
23595
|
+
},
|
|
23596
|
+
"progress": {
|
|
23597
|
+
"name": "progress",
|
|
23598
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23599
|
+
"arguments": {}
|
|
23600
|
+
},
|
|
23601
|
+
"executed": {
|
|
23602
|
+
"name": "executed",
|
|
23603
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23604
|
+
"arguments": {}
|
|
23605
|
+
},
|
|
23606
|
+
"execution_cached": {
|
|
23607
|
+
"name": "execution_cached",
|
|
23608
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23609
|
+
"arguments": {}
|
|
23610
|
+
},
|
|
23611
|
+
"execution_error": {
|
|
23612
|
+
"name": "execution_error",
|
|
23613
|
+
"description": "Event emitted by ComfyUIClient",
|
|
23614
|
+
"arguments": {}
|
|
23630
23615
|
}
|
|
23631
23616
|
},
|
|
23632
|
-
"events": {},
|
|
23633
23617
|
"state": {},
|
|
23634
23618
|
"options": {},
|
|
23635
23619
|
"envVars": [],
|
|
23636
23620
|
"examples": [
|
|
23637
23621
|
{
|
|
23638
23622
|
"language": "ts",
|
|
23639
|
-
"code": "const
|
|
23623
|
+
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
23640
23624
|
}
|
|
23641
23625
|
]
|
|
23642
23626
|
},
|
|
23643
23627
|
{
|
|
23644
|
-
"id": "clients.
|
|
23645
|
-
"description": "
|
|
23646
|
-
"shortcut": "clients.
|
|
23647
|
-
"className": "
|
|
23628
|
+
"id": "clients.openai",
|
|
23629
|
+
"description": "OpenAI client — wraps the OpenAI SDK for chat completions, responses API, embeddings, and image generation. Provides convenience methods for common operations while tracking token usage and request counts. Supports both the Chat Completions API and the newer Responses API.",
|
|
23630
|
+
"shortcut": "clients.openai",
|
|
23631
|
+
"className": "OpenAIClient",
|
|
23648
23632
|
"methods": {
|
|
23649
|
-
"
|
|
23650
|
-
"description": "
|
|
23633
|
+
"connect": {
|
|
23634
|
+
"description": "Test the API connection by listing models.",
|
|
23635
|
+
"parameters": {},
|
|
23636
|
+
"required": [],
|
|
23637
|
+
"returns": "Promise<this>",
|
|
23638
|
+
"examples": [
|
|
23639
|
+
{
|
|
23640
|
+
"language": "ts",
|
|
23641
|
+
"code": "await openai.connect()"
|
|
23642
|
+
}
|
|
23643
|
+
]
|
|
23644
|
+
},
|
|
23645
|
+
"createChatCompletion": {
|
|
23646
|
+
"description": "Create a chat completion using the Chat Completions API.",
|
|
23651
23647
|
"parameters": {
|
|
23652
|
-
"
|
|
23653
|
-
"type": "
|
|
23654
|
-
"description": "
|
|
23648
|
+
"messages": {
|
|
23649
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
23650
|
+
"description": "Array of chat messages"
|
|
23655
23651
|
},
|
|
23656
|
-
"
|
|
23657
|
-
"type": "
|
|
23658
|
-
"description": "
|
|
23652
|
+
"options": {
|
|
23653
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23654
|
+
"description": "Additional parameters for the completion"
|
|
23659
23655
|
}
|
|
23660
23656
|
},
|
|
23661
23657
|
"required": [
|
|
23662
|
-
"
|
|
23658
|
+
"messages"
|
|
23663
23659
|
],
|
|
23664
|
-
"returns": "Promise<
|
|
23660
|
+
"returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
|
|
23665
23661
|
"examples": [
|
|
23666
23662
|
{
|
|
23667
23663
|
"language": "ts",
|
|
23668
|
-
"code": "const {
|
|
23664
|
+
"code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
|
|
23669
23665
|
}
|
|
23670
23666
|
]
|
|
23671
23667
|
},
|
|
23672
|
-
"
|
|
23673
|
-
"description": "
|
|
23674
|
-
"parameters": {},
|
|
23675
|
-
"required": [],
|
|
23676
|
-
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
23677
|
-
},
|
|
23678
|
-
"getHistory": {
|
|
23679
|
-
"description": "Get execution history, optionally for a specific prompt.",
|
|
23668
|
+
"createResponse": {
|
|
23669
|
+
"description": "Create a response using the Responses API.",
|
|
23680
23670
|
"parameters": {
|
|
23681
|
-
"
|
|
23682
|
-
"type": "string",
|
|
23683
|
-
"description": "
|
|
23671
|
+
"input": {
|
|
23672
|
+
"type": "OpenAI.Responses.ResponseInput | string",
|
|
23673
|
+
"description": "The input prompt or message array"
|
|
23674
|
+
},
|
|
23675
|
+
"options": {
|
|
23676
|
+
"type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
|
|
23677
|
+
"description": "Additional parameters for the response"
|
|
23684
23678
|
}
|
|
23685
23679
|
},
|
|
23686
|
-
"required": [
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23690
|
-
"
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
|
|
23680
|
+
"required": [
|
|
23681
|
+
"input"
|
|
23682
|
+
],
|
|
23683
|
+
"returns": "Promise<OpenAI.Responses.Response>",
|
|
23684
|
+
"examples": [
|
|
23685
|
+
{
|
|
23686
|
+
"language": "ts",
|
|
23687
|
+
"code": "const response = await openai.createResponse('Explain quantum computing')"
|
|
23688
|
+
}
|
|
23689
|
+
]
|
|
23694
23690
|
},
|
|
23695
|
-
"
|
|
23696
|
-
"description": "
|
|
23697
|
-
"parameters": {
|
|
23698
|
-
"
|
|
23699
|
-
"type": "string",
|
|
23700
|
-
"description": "
|
|
23691
|
+
"streamResponse": {
|
|
23692
|
+
"description": "Stream a response using the Responses API.",
|
|
23693
|
+
"parameters": {
|
|
23694
|
+
"input": {
|
|
23695
|
+
"type": "OpenAI.Responses.ResponseInput | string",
|
|
23696
|
+
"description": "The input prompt or message array"
|
|
23697
|
+
},
|
|
23698
|
+
"options": {
|
|
23699
|
+
"type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
|
|
23700
|
+
"description": "Additional parameters for the streaming response"
|
|
23701
23701
|
}
|
|
23702
23702
|
},
|
|
23703
|
-
"required": [
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
"
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23703
|
+
"required": [
|
|
23704
|
+
"input"
|
|
23705
|
+
],
|
|
23706
|
+
"returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
|
|
23707
|
+
"examples": [
|
|
23708
|
+
{
|
|
23709
|
+
"language": "ts",
|
|
23710
|
+
"code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
|
|
23711
|
+
}
|
|
23712
|
+
]
|
|
23711
23713
|
},
|
|
23712
|
-
"
|
|
23713
|
-
"description": "
|
|
23714
|
+
"createCompletion": {
|
|
23715
|
+
"description": "Create a legacy text completion.",
|
|
23714
23716
|
"parameters": {
|
|
23715
|
-
"
|
|
23717
|
+
"prompt": {
|
|
23716
23718
|
"type": "string",
|
|
23717
|
-
"description": "
|
|
23719
|
+
"description": "The text prompt to complete"
|
|
23720
|
+
},
|
|
23721
|
+
"options": {
|
|
23722
|
+
"type": "Partial<OpenAI.Completions.CompletionCreateParams>",
|
|
23723
|
+
"description": "Additional parameters for the completion"
|
|
23718
23724
|
}
|
|
23719
23725
|
},
|
|
23720
|
-
"required": [
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
"
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
|
|
23726
|
+
"required": [
|
|
23727
|
+
"prompt"
|
|
23728
|
+
],
|
|
23729
|
+
"returns": "Promise<OpenAI.Completions.Completion>",
|
|
23730
|
+
"examples": [
|
|
23731
|
+
{
|
|
23732
|
+
"language": "ts",
|
|
23733
|
+
"code": "const response = await openai.createCompletion('Once upon a time')"
|
|
23734
|
+
}
|
|
23735
|
+
]
|
|
23728
23736
|
},
|
|
23729
|
-
"
|
|
23730
|
-
"description": "
|
|
23737
|
+
"createEmbedding": {
|
|
23738
|
+
"description": "Create text embeddings for semantic search or similarity comparisons.",
|
|
23731
23739
|
"parameters": {
|
|
23732
|
-
"
|
|
23733
|
-
"type": "
|
|
23734
|
-
"description": "
|
|
23735
|
-
},
|
|
23736
|
-
"filename": {
|
|
23737
|
-
"type": "string",
|
|
23738
|
-
"description": "File name for the upload"
|
|
23740
|
+
"input": {
|
|
23741
|
+
"type": "string | string[]",
|
|
23742
|
+
"description": "A string or array of strings to embed"
|
|
23739
23743
|
},
|
|
23740
|
-
"
|
|
23741
|
-
"type": "
|
|
23742
|
-
"description": "
|
|
23744
|
+
"options": {
|
|
23745
|
+
"type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
|
|
23746
|
+
"description": "Additional parameters (model, etc.)"
|
|
23743
23747
|
}
|
|
23744
23748
|
},
|
|
23745
23749
|
"required": [
|
|
23746
|
-
"
|
|
23747
|
-
"filename"
|
|
23750
|
+
"input"
|
|
23748
23751
|
],
|
|
23749
|
-
"returns": "Promise<
|
|
23752
|
+
"returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
|
|
23753
|
+
"examples": [
|
|
23754
|
+
{
|
|
23755
|
+
"language": "ts",
|
|
23756
|
+
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
23757
|
+
}
|
|
23758
|
+
]
|
|
23750
23759
|
},
|
|
23751
|
-
"
|
|
23752
|
-
"description": "
|
|
23760
|
+
"createImage": {
|
|
23761
|
+
"description": "Generate an image from a text prompt using DALL-E.",
|
|
23753
23762
|
"parameters": {
|
|
23754
|
-
"
|
|
23763
|
+
"prompt": {
|
|
23755
23764
|
"type": "string",
|
|
23756
|
-
"description": "
|
|
23757
|
-
},
|
|
23758
|
-
"subfolder": {
|
|
23759
|
-
"type": "any",
|
|
23760
|
-
"description": "Subfolder within the output directory"
|
|
23765
|
+
"description": "Description of the image to generate"
|
|
23761
23766
|
},
|
|
23762
|
-
"
|
|
23763
|
-
"type": "
|
|
23764
|
-
"description": "
|
|
23767
|
+
"options": {
|
|
23768
|
+
"type": "Partial<OpenAI.Images.ImageGenerateParams>",
|
|
23769
|
+
"description": "Additional parameters (size, n, etc.)"
|
|
23765
23770
|
}
|
|
23766
23771
|
},
|
|
23767
23772
|
"required": [
|
|
23768
|
-
"
|
|
23773
|
+
"prompt"
|
|
23769
23774
|
],
|
|
23770
|
-
"returns": "Promise<
|
|
23771
|
-
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
|
|
23775
|
+
"returns": "Promise<OpenAI.Images.ImagesResponse>",
|
|
23776
|
+
"examples": [
|
|
23777
|
+
{
|
|
23778
|
+
"language": "ts",
|
|
23779
|
+
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
23780
|
+
}
|
|
23781
|
+
]
|
|
23777
23782
|
},
|
|
23778
|
-
"
|
|
23779
|
-
"description": "
|
|
23783
|
+
"listModels": {
|
|
23784
|
+
"description": "List all available models.",
|
|
23780
23785
|
"parameters": {},
|
|
23781
23786
|
"required": [],
|
|
23782
|
-
"returns": "
|
|
23787
|
+
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
23788
|
+
"examples": [
|
|
23789
|
+
{
|
|
23790
|
+
"language": "ts",
|
|
23791
|
+
"code": "const models = await openai.listModels()"
|
|
23792
|
+
}
|
|
23793
|
+
]
|
|
23783
23794
|
},
|
|
23784
|
-
"
|
|
23785
|
-
"description": "
|
|
23795
|
+
"ask": {
|
|
23796
|
+
"description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
|
|
23786
23797
|
"parameters": {
|
|
23787
|
-
"
|
|
23788
|
-
"type": "
|
|
23789
|
-
"description": "
|
|
23798
|
+
"question": {
|
|
23799
|
+
"type": "string",
|
|
23800
|
+
"description": "The question to ask"
|
|
23801
|
+
},
|
|
23802
|
+
"options": {
|
|
23803
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23804
|
+
"description": "Additional completion parameters"
|
|
23790
23805
|
}
|
|
23791
23806
|
},
|
|
23792
23807
|
"required": [
|
|
23793
|
-
"
|
|
23808
|
+
"question"
|
|
23794
23809
|
],
|
|
23795
|
-
"returns": "Promise<
|
|
23810
|
+
"returns": "Promise<string>",
|
|
23811
|
+
"examples": [
|
|
23812
|
+
{
|
|
23813
|
+
"language": "ts",
|
|
23814
|
+
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
23815
|
+
}
|
|
23816
|
+
]
|
|
23796
23817
|
},
|
|
23797
|
-
"
|
|
23798
|
-
"description": "
|
|
23818
|
+
"chat": {
|
|
23819
|
+
"description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
|
|
23799
23820
|
"parameters": {
|
|
23800
|
-
"
|
|
23801
|
-
"type": "
|
|
23802
|
-
"description": "
|
|
23803
|
-
},
|
|
23804
|
-
"inputs": {
|
|
23805
|
-
"type": "Record<string, any>",
|
|
23806
|
-
"description": "Parameter inputs"
|
|
23821
|
+
"messages": {
|
|
23822
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
23823
|
+
"description": "Array of chat messages"
|
|
23807
23824
|
},
|
|
23808
23825
|
"options": {
|
|
23809
|
-
"type": "
|
|
23810
|
-
"description": "
|
|
23811
|
-
"properties": {
|
|
23812
|
-
"poll": {
|
|
23813
|
-
"type": "boolean",
|
|
23814
|
-
"description": "Use polling instead of WebSocket for tracking execution"
|
|
23815
|
-
},
|
|
23816
|
-
"pollInterval": {
|
|
23817
|
-
"type": "number",
|
|
23818
|
-
"description": "Polling interval in ms (default 1000)"
|
|
23819
|
-
},
|
|
23820
|
-
"inputMap": {
|
|
23821
|
-
"type": "InputMapping",
|
|
23822
|
-
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
23823
|
-
},
|
|
23824
|
-
"outputDir": {
|
|
23825
|
-
"type": "string",
|
|
23826
|
-
"description": "If provided, output images are downloaded to this directory"
|
|
23827
|
-
}
|
|
23828
|
-
}
|
|
23826
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23827
|
+
"description": "Additional completion parameters"
|
|
23829
23828
|
}
|
|
23830
23829
|
},
|
|
23831
23830
|
"required": [
|
|
23832
|
-
"
|
|
23831
|
+
"messages"
|
|
23833
23832
|
],
|
|
23834
|
-
"returns": "Promise<
|
|
23833
|
+
"returns": "Promise<string>",
|
|
23834
|
+
"examples": [
|
|
23835
|
+
{
|
|
23836
|
+
"language": "ts",
|
|
23837
|
+
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
23838
|
+
}
|
|
23839
|
+
]
|
|
23835
23840
|
}
|
|
23836
23841
|
},
|
|
23837
23842
|
"getters": {
|
|
23838
|
-
"
|
|
23839
|
-
"description": "The
|
|
23843
|
+
"defaultModel": {
|
|
23844
|
+
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
23840
23845
|
"returns": "string"
|
|
23841
23846
|
},
|
|
23842
|
-
"
|
|
23843
|
-
"description": "The
|
|
23844
|
-
"returns": "
|
|
23847
|
+
"raw": {
|
|
23848
|
+
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
23849
|
+
"returns": "OpenAI"
|
|
23845
23850
|
}
|
|
23846
23851
|
},
|
|
23847
23852
|
"events": {
|
|
23848
|
-
"
|
|
23849
|
-
"name": "
|
|
23850
|
-
"description": "Event emitted by
|
|
23851
|
-
"arguments": {}
|
|
23852
|
-
},
|
|
23853
|
-
"execution_complete": {
|
|
23854
|
-
"name": "execution_complete",
|
|
23855
|
-
"description": "Event emitted by ComfyUIClient",
|
|
23853
|
+
"connected": {
|
|
23854
|
+
"name": "connected",
|
|
23855
|
+
"description": "Event emitted by OpenAIClient",
|
|
23856
23856
|
"arguments": {}
|
|
23857
23857
|
},
|
|
23858
|
-
"
|
|
23859
|
-
"name": "
|
|
23860
|
-
"description": "Event emitted by
|
|
23858
|
+
"failure": {
|
|
23859
|
+
"name": "failure",
|
|
23860
|
+
"description": "Event emitted by OpenAIClient",
|
|
23861
23861
|
"arguments": {}
|
|
23862
23862
|
},
|
|
23863
|
-
"
|
|
23864
|
-
"name": "
|
|
23865
|
-
"description": "Event emitted by
|
|
23863
|
+
"completion": {
|
|
23864
|
+
"name": "completion",
|
|
23865
|
+
"description": "Event emitted by OpenAIClient",
|
|
23866
23866
|
"arguments": {}
|
|
23867
23867
|
},
|
|
23868
|
-
"
|
|
23869
|
-
"name": "
|
|
23870
|
-
"description": "Event emitted by
|
|
23868
|
+
"embedding": {
|
|
23869
|
+
"name": "embedding",
|
|
23870
|
+
"description": "Event emitted by OpenAIClient",
|
|
23871
23871
|
"arguments": {}
|
|
23872
23872
|
},
|
|
23873
|
-
"
|
|
23874
|
-
"name": "
|
|
23875
|
-
"description": "Event emitted by
|
|
23873
|
+
"image": {
|
|
23874
|
+
"name": "image",
|
|
23875
|
+
"description": "Event emitted by OpenAIClient",
|
|
23876
23876
|
"arguments": {}
|
|
23877
23877
|
},
|
|
23878
|
-
"
|
|
23879
|
-
"name": "
|
|
23880
|
-
"description": "Event emitted by
|
|
23878
|
+
"models": {
|
|
23879
|
+
"name": "models",
|
|
23880
|
+
"description": "Event emitted by OpenAIClient",
|
|
23881
23881
|
"arguments": {}
|
|
23882
23882
|
}
|
|
23883
23883
|
},
|
|
@@ -23887,7 +23887,7 @@ export const introspectionData = [
|
|
|
23887
23887
|
"examples": [
|
|
23888
23888
|
{
|
|
23889
23889
|
"language": "ts",
|
|
23890
|
-
"code": "const
|
|
23890
|
+
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
23891
23891
|
}
|
|
23892
23892
|
]
|
|
23893
23893
|
},
|