transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
MIT License
16.07k stars 2.11k forks source link

functions support #609

Closed mrahmadt closed 11 months ago

mrahmadt commented 11 months ago

Describe the feature

Hello Just wanted to say that functions is supported in chatgpt-api :)

It's not documented in https://github.com/transitive-bullshit/chatgpt-api/blob/main/docs/interfaces/openai.CreateChatCompletionRequest.md

But it will work

    const completionParamsOptions = {
        functions: functions,
        function_call: "auto"
    };
    chatgptAPI = new ChatGPTAPI({
        apiKey: openAIAPIKey,
        debug: true,
        completionParams: completionParamsOptions
    })