Skip to content

Conversation

gladstone-openai
Copy link
Contributor

Summary

Briefly describe the changes and the goal of this PR. Make sure the PR title summarizes the changes effectively.

Motivation

Why are these changes necessary? How do they improve the cookbook?


For new content

When contributing new content, read through our contribution guidelines, and mark the following action items as completed:

  • I have added a new entry in registry.yaml (and, optionally, in authors.yaml) so that my content renders on the cookbook website.
  • I have conducted a self-review of my content based on the contribution guidelines:
    • Relevance: This content is related to building with OpenAI technologies and is useful to others.
    • Uniqueness: I have searched for related examples in the OpenAI Cookbook, and verified that my content offers new insights or unique information compared to existing documentation.
    • Spelling and Grammar: I have checked for spelling or grammatical mistakes.
    • Clarity: I have done a final read-through and verified that my submission is well-organized and easy to understand.
    • Correctness: The information I include is correct and all of my code executes successfully.
    • Completeness: I have explained everything fully, including all necessary references and citations.

We will rate each of these areas on a scale from 1 to 4, and will only accept contributions that score 3 or higher on all areas. Refer to our contribution guidelines for more details.

"metadata": {},
"source": [
"* Files returned to ChatGPT are limited in size to 10MB. Your request may fail if the file returned is larger than that. Ensure to include LIMITs on your SQL commands if you find you are running into these limitations.\n",
"* _Why is the Azure Function App requred in the first place?_ ChatGPT’s Data Analysis feature (aka Code Interpreter) depends on a secure Python environment that is separate from the model’s context window. Data passed to Data Analysis must be done so by uploading a file today. GPT actions returning data must then return that data as a CSV or other data file type. In order to return a file via GPT action, the response must be wrapped in an `openaiFileResponse` object. This requires custom code to properly format the response.\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious on why the Drive integration can return files directly if we have a specific format expected. We don't need a middleware for that one I believe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't return files. It returns file contents. You can't pass a file directly from Drive into Code Interpreter without middleware

@pap-openai
Copy link
Collaborator

Looks good to me – as I've incorporated some changes I'll let you merge if you agree with those @gladstone-openai.

@pap-openai
Copy link
Collaborator

Added title that was missing and hyperlinks instead of relative (not sure they work on the cookbook, might revisit later).

Two things I'm also wondering but don't believe we should change/wait to merge but can revisit later:

  1. Should we reference the Direct cookbook (as the direct references this one) ? Or Should it be just one cookbook but with two different ways of integration referenced in it ?
  2. Should we rename "Middleware" to "Files/CSVs" or something like that. Middleware is the "how" rather than the "why"/"what" which feels less explicit when just looking at titles – a user may ask why would I need a middleware and would just go direct if they don't read through all of the content

@gladstone-openai
Copy link
Contributor Author

Added title that was missing and hyperlinks instead of relative (not sure they work on the cookbook, might revisit later).

Two things I'm also wondering but don't believe we should change/wait to merge but can revisit later:

  1. Should we reference the Direct cookbook (as the direct references this one) ? Or Should it be just one cookbook but with two different ways of integration referenced in it ?
  2. Should we rename "Middleware" to "Files/CSVs" or something like that. Middleware is the "how" rather than the "why"/"what" which feels less explicit when just looking at titles – a user may ask why would I need a middleware and would just go direct if they don't read through all of the content

I agree with both of these. I can address in a follow up commit, though we should chat about the best naming convention for direct vs middleware. I agree the current one is bad. I just don't know what the right answer is.

Not that it matters, but swapping order that I mistakenly mixed up on merge conflict.
@gladstone-openai gladstone-openai merged commit 3691b4b into main Aug 14, 2024
@gladstone-openai gladstone-openai deleted the gladstone/snowflake-middleware branch August 14, 2024 15:35
joshagilend pushed a commit to joshagilend/openai-cookbook that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants