Open AI and sending to Slack

API works
Prompt works
Response from Open AI contains text, but it is truncated and cut off.
Push to Slack is also fine, but it is truncated text.

Hello @mitchlieberman,

Searching through the web, I think this might be a limitation on the Open AI APIs.

Maybe you can rephrase your question or change your settings to have the shorter answer?
https://help.openai.com/en/articles/5072518-controlling-the-length-of-completions

Hi @mitchlieberman

Also make sure you’re passing the max_tokens variable to the completions prompt, that will decide how the maximum length of content for the GPT response.

We cover how to use that variable here:

Thanks.

The issue seems to be the variable created by Pipedream is truncating the response. I can see random characters. For example, when the first character in the response is a comma and then a carriage return, the issue is how the Pipedream application is receiving the response.

I have built a few integrations with code, using the API in Python, and Node.js - I am comfortable with the token and the API. I was trying Pipedream, as an alternative and easier path.

Mitch

Hi @mitchlieberman

Can you share your Node.js/Python code or the configuration of the action with this issue?

When I run in Zapier with the same settings and prompt “Tell me about the renaissance”, I get:

The Renaissance and the Enlightenment were two distinct periods in European history. The Renaissance, which occurred from the 14th to the 17th centuries, was a period of creative and intellectual activity, characterized by the emergence of humanism and the revival of classical learning. The Enlightenment, which occurred from the late 17th to the late 18th centuries, was a period of intellectual, scientific, and political thought that sought to apply reason and reasoning to the natural world and to human societies.

The Renaissance was a period of rediscovery and exploration, in which scholars and artists sought to revive the spirit of classical antiquity. This period saw the emergence of new approaches to art, literature, science, and philosophy, which were used to question traditional beliefs and assumptions. The Enlightenment, on the other hand, was a period of rationalism and scientific thought, in which reason was used to challenge traditional beliefs and assumptions. This period saw the emergence of new political philosophies and movements, such as the American and French Revolutions, which sought to challenge the authority of the monarchy and the Church.

Overall, the Renaissance was a period of creative and intellectual activity, while the Enlightenment was a period of scientific and political thought. Both periods sought to challenge traditional beliefs and assumptions and to apply new

When I run in Pipedream:

It was truncated - now that I have rerun the exact same test, the full text is pushed to Slack. I did not change a thing…I will continue to test.

Thanks for the help.

Mitch

I think the Renaissance was one of the most important and influential periods in history. During this time, we saw a shift in ideas and values from the Medieval period, forming the foundations of the modern world. People were exposed to new ways of thinking, a renewed interest in the arts, and advances in science, medicine, and technology. It was an incredibly exciting time in history.

Hi @mitchlieberman,

Still not sure when the data is truncated. Do you mean the response from OpenAI is truncated in the step export of your OpenAI prompt step?

Or do you mean the text response rendered in Slack is truncated?

Please provide screenshots of configurations or code samples for further support.

Thanks!