You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add code interpreter feature, but I don't know how to set such option.
Motivation
The current ChatGPT (official web version) has a code interpreter. I want to add option to enable it on this repository, but I'm not familier with node.js. If someone knows how to add such code, please help me to enable it.
const assistant = await openai.beta.assistants.create({
instructions: "You are a personal math tutor. When asked a math question, write and run code to answer the question.",
model: "gpt-4-1106-preview",
tools: [{"type": "code_interpreter"}]
});
Curl
curl https://api.openai.com/v1/assistants \
-u :$OPENAI_API_KEY \
-H 'Content-Type: application/json' \
-H 'OpenAI-Beta: assistants=v1' \
-d '{
"instructions": "You are a personal math tutor. When asked a math question, write and run code to answer the question.",
"tools": [
{ "type": "code_interpreter" }
],
"model": "gpt-4-1106-preview"
}'
Problem and What I Tried
I tried to find where the model / assistant initialized as below, but could not find where to add / test codes.
I am grateful for any kind of answer.
Added tools?: [{"type": "code_interpreter"}] to the src/lib/providers/openai/models.svelte
Added tools?: Array<Record<string, string>>; to the Request of src/lib/Types.svelte
Thank you for reading this question / feature request. I believe it would significantly enhance the capabilities and applications of this app.
The text was updated successfully, but these errors were encountered:
Summary
I would like to add code interpreter feature, but I don't know how to set such option.
Motivation
The current ChatGPT (official web version) has a code interpreter. I want to add option to enable it on this repository, but I'm not familier with node.js. If someone knows how to add such code, please help me to enable it.
Official Documentation
According to the document below, I need to set
tools
option to the model initialization.https://platform.openai.com/docs/assistants/tools/enabling-code-interpreter
Problem and What I Tried
I tried to find where the model / assistant initialized as below, but could not find where to add / test codes.
I am grateful for any kind of answer.
tools?: [{"type": "code_interpreter"}]
to the src/lib/providers/openai/models.sveltetools?: Array<Record<string, string>>;
to theRequest
of src/lib/Types.svelteThank you for reading this question / feature request. I believe it would significantly enhance the capabilities and applications of this app.
The text was updated successfully, but these errors were encountered: