What GPT4 model should be used for error-free Open AI integration?

AndrewLeb
Tourist
46 0 2

Which GPT4 model to use in Open AI integration to avoid getting this error: 

 

This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?: {"status":400,"response_body":"{\"message\":\"This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?\",\"body\":{\"error\":{\"message\":\"This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?\",\"type\":\"invalid_request_error\",\"param\":\"model\",\"code\":null}},\"return_value\":\"\"}","verb":"POST","url":"https://flow-connectors.sfe.shopifyinternal.com/actions","request_body":"{\"shop_id\":50509283527,\"shopify_domain\":\"jeans4you-shop.myshopify.com\",\"properties\":{\"prompt\":\"Given the review text, evaluate its content and identify the main topic of the review. The review topic should be one of the predefined categories: product-discrepancies, delivery-issues, personal-preferences, too-small, or too-big.\\n\\nReview: This jacket is 3 sizes smaller than I ordered, but say 2 sizes bigger than what I ordered. SAD.\\n\\nReturn the most relevant review topic.\",\"model\":\"gpt-4\",\"suffix\":\"\",\"max_tokens\":256,\"temperature\":0.7,\"top_p\":1.0,\"stop\":\"\",\"presence_penalty\":0.0,\"frequency_penalty\":0.0,\"logit_bias\":\"{\\n \\\"delivery-issues\\\": 1.0,\\n \\\"product-discrepancies\\\": 1.0,\\n \\\"personal-preferences\\\": 1.0,\\n \\\"too-small\\\": 1.0,\\n \\\"too-big\\\": 1.0\\n}\\n\"},\"action_run_id\":\"f47dc9323d37dd3e1ca6ee43462606e759411ec1\",\"action_definition_id\":\"Generate text\"}"} 

 

Screenshot 2024-04-20 145327.png

Replies 3 (3)

paul_n
Shopify Staff
1024 133 243

GPT-4 can't be used with the API that Flow uses for that action. 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AndrewLeb
Tourist
46 0 2

Are you going to make it available in the future? 

paul_n
Shopify Staff
1024 133 243

Likely, but we don't have this planned currently. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.