@@ -40,15 +40,14 @@ okay as long as the timeout is reasonably short.
4040## Functions
4141
4242- [ create_completion(model, prompt, temperature, callback_or_timeout)] ( #create_completion )
43- - [ create_chat(model, prompt, temperature, max_tokens, callback_or_timeout)] ( #create_chat )
4443
4544### create_completion
4645
4746``` lua
4847openai .create_completion (model , prompt , temperature , callback_or_timeout )
4948```
5049
51- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/openai.lua#L107 )
50+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/openai.lua#L105 )
5251
5352Sends a request to the OpenAI API to generate a completion for a given prompt.
5453
@@ -63,26 +62,3 @@ Sends a request to the OpenAI API to generate a completion for a given prompt.
6362| ----------- | ----------- |
6463| ` boolean ` | if synchronous call. See above for asynchronous. |
6564| ` string ` | if synchronous call. See above for asynchronous. |
66-
67- ### create_chat
68-
69- ``` lua
70- openai .create_chat (model , prompt , temperature , max_tokens , callback_or_timeout )
71- ```
72-
73- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/openai.lua#L132 )
74-
75- Sends a request to the OpenAI API to generate a completion for a given prompt.
76-
77- | Input | Type | Description |
78- | ----- | ---- | ----------- |
79- | ` model ` | ` string ` | The model to use, e.g., "gpt-3.5-turbo" |
80- | ` prompt ` | ` string ` | The prompt to send |
81- | ` temperature ` | ` number ` | A value between 0.0 and 1.0. See the OpenAI documentation for information. |
82- | ` max_tokens ` | ` number ` | The maximum number of tokens to generate |
83- | ` callback_or_timeout ` (optional) | ` function or number ` | Defaults to 5.0. |
84-
85- | Return type | Description |
86- | ----------- | ----------- |
87- | ` boolean ` | if synchronous call. See above for asynchronous. |
88- | ` string ` | if synchronous call. See above for asynchronous. |
0 commit comments