---
title: "Comment by Coder Bible on \"Extracting and Generating JSON Data with OpenAI GPT, LangChain, and Python\" | Hashnode"
description: "Good one, how about using function calling?"
url: "https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3/comment/6500381c703e32bdbc1d2253"
---

[Discussion](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3)

Comment [Extracting and Generating JSON Data with OpenAI GPT, LangChain, and Python](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3)

[Coder Bible](https://hashnode.com/@coderbible)

[Sep 12, 2023](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3/comment/6500381c703e32bdbc1d2253)

Good one, how about using function calling?

[Karol Horosin](https://hashnode.com/@horosin)

[Sep 12, 2023](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3/comment/6500381c703e32bdbc1d2253#reply-65007ed1d3da8dcacfaa8c07)

This is a great approach but not flexible between LLMs. It should bo more optimal prompt size wise. For function calling, I would use openai Python package directly.

[Coder Bible](https://hashnode.com/@coderbible)

[Sep 16, 2023](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3/comment/6500381c703e32bdbc1d2253#reply-65052286dbce26f1baf9f771)

[Karol Horosin](https://hashnode.com/@horosin) any tips on how to do this right?

[Karol Horosin](https://hashnode.com/@horosin)

[Sep 22, 2023](https://hashnode.com/posts/extracting-and-generating-json-data-with-openai-gpt-langchain-and-python/64ffa38cdc0c7065275f11e3/comment/6500381c703e32bdbc1d2253#reply-650d2a9f721e3f2693c45201)

[Coder Bible](https://hashnode.com/@coderbible) Ill think about a separate article. In the meantime, I've prepared a demo of function calling. Not for data extraction but instead of calling a function you can just take the input and use it in your application.

[github.com/horosin/openai-functions-demo](https://github.com/horosin/openai-functions-demo)
