diff --git a/.gitignore b/.gitignore index cb1faed3..b0effa1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build **.egg-info venv +.DS_Store diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..61bf32c2 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/search.js b/docs/search.js new file mode 100644 index 00000000..6728f647 --- /dev/null +++ b/docs/search.js @@ -0,0 +1,46 @@ +window.pdocSearch = (function(){ +/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();oA module to interact with the Vanna.AI API, providing the functionality to generate SQL explanations.

\n\n
\n
import vanna as vn\n\nvn.api_key = 'vanna-key-...' # Set your API key\nvn.set_org('') # Set your organization name\n\nvn.store_sql(question="Who are the top 10 customers by Sales?", sql="SELECT customer_name, sales FROM customers ORDER BY sales DESC LIMIT 10")\n\nmy_question = 'What are the top 10 ABC by XYZ?'\n\nsql = vn.generate_sql(question=my_question, error_msg=None) \n# SELECT * FROM table_name WHERE column_name = 'value'\n\nconn = snowflake.connector.connect(\n        user='my_user',\n        password='my_password',\n        account='my_account',\n        database='my_database',\n    )\n\ncs = conn.cursor()\n\ndf = vn.get_results(cs, my_default_db, sql)\n\nplotly_code = vn.generate_plotly_code(question="Who are the top 10 customers by Sales?", sql=sql, df=df)\n# px.bar(df, x='column_name', y='column_name')\n\nfig = vn.get_plotly_figure(plotly_code=plotly_code, df=df)\n
\n
\n"}, "vanna.api_key": {"fullname": "vanna.api_key", "modulename": "vanna", "qualname": "api_key", "kind": "variable", "doc": "

\n", "annotation": ": Optional[str]", "default_value": "None"}, "vanna.set_org": {"fullname": "vanna.set_org", "modulename": "vanna", "qualname": "set_org", "kind": "function", "doc": "

Set the organization name for the Vanna.AI API.

\n\n

Args:\n org (str): The organization name.

\n", "signature": "(org: str) -> None:", "funcdef": "def"}, "vanna.store_sql": {"fullname": "vanna.store_sql", "modulename": "vanna", "qualname": "store_sql", "kind": "function", "doc": "

Store a question and its corresponding SQL query in the Vanna.AI database.

\n\n

Args:\n question (str): The question to store.\n sql (str): The SQL query to store.

\n", "signature": "(question: str, sql: str) -> bool:", "funcdef": "def"}, "vanna.remove_sql": {"fullname": "vanna.remove_sql", "modulename": "vanna", "qualname": "remove_sql", "kind": "function", "doc": "

Remove a question and its corresponding SQL query from the Vanna.AI database.

\n\n

Args:\n question (str): The question to remove.

\n", "signature": "(question: str) -> bool:", "funcdef": "def"}, "vanna.generate_sql": {"fullname": "vanna.generate_sql", "modulename": "vanna", "qualname": "generate_sql", "kind": "function", "doc": "

Generate an SQL query using the Vanna.AI API.

\n\n

Args:\n question (str): The question to generate an SQL query for.

\n\n

Returns:\n str or None: The SQL query, or None if an error occurred.

\n", "signature": "(question: str) -> str | None:", "funcdef": "def"}, "vanna.generate_plotly_code": {"fullname": "vanna.generate_plotly_code", "modulename": "vanna", "qualname": "generate_plotly_code", "kind": "function", "doc": "

Generate Plotly code using the Vanna.AI API.

\n\n

Args:\n question (str): The question to generate Plotly code for.\n sql (str): The SQL query to generate Plotly code for.\n df (pd.DataFrame): The dataframe to generate Plotly code for.

\n\n

Returns:\n str or None: The Plotly code, or None if an error occurred.

\n", "signature": "(\tquestion: str | None,\tsql: str | None,\tdf: pandas.core.frame.DataFrame) -> str | None:", "funcdef": "def"}, "vanna.get_plotly_figure": {"fullname": "vanna.get_plotly_figure", "modulename": "vanna", "qualname": "get_plotly_figure", "kind": "function", "doc": "

Get a Plotly figure from a dataframe and Plotly code.

\n\n

Args:\n df (pd.DataFrame): The dataframe to use.\n plotly_code (str): The Plotly code to use.

\n\n

Returns:\n plotly.graph_objs.Figure: The Plotly figure.

\n", "signature": "(\tplotly_code: str,\tdf: pandas.core.frame.DataFrame,\tdark_mode: bool = True) -> plotly.graph_objs._figure.Figure | None:", "funcdef": "def"}, "vanna.get_results": {"fullname": "vanna.get_results", "modulename": "vanna", "qualname": "get_results", "kind": "function", "doc": "

Get the results of an SQL query using the Vanna.AI API.

\n\n
Parameters
\n\n
    \n
  • cs: The Snowflake cursor to use.
  • \n
  • default_database: The default database to use (executed as \"USE DATABASE {default_database};\")
  • \n
  • sql: The SQL query to run.
  • \n
\n\n
Returns
\n\n
\n

The results of the SQL query.

\n
\n", "signature": "(cs, default_database: str, sql: str) -> pandas.core.frame.DataFrame:", "funcdef": "def"}, "vanna.generate_explanation": {"fullname": "vanna.generate_explanation", "modulename": "vanna", "qualname": "generate_explanation", "kind": "function", "doc": "

Example

\n\n
\n
vn.generate_explanation(sql="SELECT * FROM students WHERE name = 'John Doe'")\n# 'AI Response'\n
\n
\n\n

Generate an explanation of an SQL query using the Vanna.AI API.

\n\n
Parameters
\n\n
    \n
  • sql: The SQL query to explain.
  • \n
\n\n
Returns
\n\n
\n

The explanation of the SQL query, or None if an error occurred.

\n
\n", "signature": "(sql: str) -> str | None:", "funcdef": "def"}, "vanna.types": {"fullname": "vanna.types", "modulename": "vanna.types", "kind": "module", "doc": "

\n"}, "vanna.types.Status": {"fullname": "vanna.types.Status", "modulename": "vanna.types", "qualname": "Status", "kind": "class", "doc": "

\n"}, "vanna.types.Status.__init__": {"fullname": "vanna.types.Status.__init__", "modulename": "vanna.types", "qualname": "Status.__init__", "kind": "function", "doc": "

\n", "signature": "(success: bool, message: str)"}, "vanna.types.Status.success": {"fullname": "vanna.types.Status.success", "modulename": "vanna.types", "qualname": "Status.success", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "vanna.types.Status.message": {"fullname": "vanna.types.Status.message", "modulename": "vanna.types", "qualname": "Status.message", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.FullQuestionDocument": {"fullname": "vanna.types.FullQuestionDocument", "modulename": "vanna.types", "qualname": "FullQuestionDocument", "kind": "class", "doc": "

\n"}, "vanna.types.FullQuestionDocument.__init__": {"fullname": "vanna.types.FullQuestionDocument.__init__", "modulename": "vanna.types", "qualname": "FullQuestionDocument.__init__", "kind": "function", "doc": "

\n", "signature": "(\tid: vanna.types.QuestionId,\tquestion: vanna.types.Question,\tanswer: vanna.types.SQLAnswer | None,\tdata: vanna.types.DataResult | None,\tplotly: vanna.types.PlotlyResult | None)"}, "vanna.types.FullQuestionDocument.id": {"fullname": "vanna.types.FullQuestionDocument.id", "modulename": "vanna.types", "qualname": "FullQuestionDocument.id", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.QuestionId"}, "vanna.types.FullQuestionDocument.question": {"fullname": "vanna.types.FullQuestionDocument.question", "modulename": "vanna.types", "qualname": "FullQuestionDocument.question", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.Question"}, "vanna.types.FullQuestionDocument.answer": {"fullname": "vanna.types.FullQuestionDocument.answer", "modulename": "vanna.types", "qualname": "FullQuestionDocument.answer", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.SQLAnswer | None"}, "vanna.types.FullQuestionDocument.data": {"fullname": "vanna.types.FullQuestionDocument.data", "modulename": "vanna.types", "qualname": "FullQuestionDocument.data", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.DataResult | None"}, "vanna.types.FullQuestionDocument.plotly": {"fullname": "vanna.types.FullQuestionDocument.plotly", "modulename": "vanna.types", "qualname": "FullQuestionDocument.plotly", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.PlotlyResult | None"}, "vanna.types.QuestionSQLPair": {"fullname": "vanna.types.QuestionSQLPair", "modulename": "vanna.types", "qualname": "QuestionSQLPair", "kind": "class", "doc": "

\n"}, "vanna.types.QuestionSQLPair.__init__": {"fullname": "vanna.types.QuestionSQLPair.__init__", "modulename": "vanna.types", "qualname": "QuestionSQLPair.__init__", "kind": "function", "doc": "

\n", "signature": "(question: str, sql: str)"}, "vanna.types.QuestionSQLPair.question": {"fullname": "vanna.types.QuestionSQLPair.question", "modulename": "vanna.types", "qualname": "QuestionSQLPair.question", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.QuestionSQLPair.sql": {"fullname": "vanna.types.QuestionSQLPair.sql", "modulename": "vanna.types", "qualname": "QuestionSQLPair.sql", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Organization": {"fullname": "vanna.types.Organization", "modulename": "vanna.types", "qualname": "Organization", "kind": "class", "doc": "

\n"}, "vanna.types.Organization.__init__": {"fullname": "vanna.types.Organization.__init__", "modulename": "vanna.types", "qualname": "Organization.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str,\tuser: str | None,\tconnection: vanna.types.Connection | None)"}, "vanna.types.Organization.name": {"fullname": "vanna.types.Organization.name", "modulename": "vanna.types", "qualname": "Organization.name", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Organization.user": {"fullname": "vanna.types.Organization.user", "modulename": "vanna.types", "qualname": "Organization.user", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "vanna.types.Organization.connection": {"fullname": "vanna.types.Organization.connection", "modulename": "vanna.types", "qualname": "Organization.connection", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.Connection | None"}, "vanna.types.QuestionId": {"fullname": "vanna.types.QuestionId", "modulename": "vanna.types", "qualname": "QuestionId", "kind": "class", "doc": "

\n"}, "vanna.types.QuestionId.__init__": {"fullname": "vanna.types.QuestionId.__init__", "modulename": "vanna.types", "qualname": "QuestionId.__init__", "kind": "function", "doc": "

\n", "signature": "(id: str)"}, "vanna.types.QuestionId.id": {"fullname": "vanna.types.QuestionId.id", "modulename": "vanna.types", "qualname": "QuestionId.id", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Question": {"fullname": "vanna.types.Question", "modulename": "vanna.types", "qualname": "Question", "kind": "class", "doc": "

\n"}, "vanna.types.Question.__init__": {"fullname": "vanna.types.Question.__init__", "modulename": "vanna.types", "qualname": "Question.__init__", "kind": "function", "doc": "

\n", "signature": "(question: str)"}, "vanna.types.Question.question": {"fullname": "vanna.types.Question.question", "modulename": "vanna.types", "qualname": "Question.question", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Followup": {"fullname": "vanna.types.Followup", "modulename": "vanna.types", "qualname": "Followup", "kind": "class", "doc": "

\n"}, "vanna.types.Followup.__init__": {"fullname": "vanna.types.Followup.__init__", "modulename": "vanna.types", "qualname": "Followup.__init__", "kind": "function", "doc": "

\n", "signature": "(followup: str)"}, "vanna.types.Followup.followup": {"fullname": "vanna.types.Followup.followup", "modulename": "vanna.types", "qualname": "Followup.followup", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.QuestionEmbedding": {"fullname": "vanna.types.QuestionEmbedding", "modulename": "vanna.types", "qualname": "QuestionEmbedding", "kind": "class", "doc": "

\n"}, "vanna.types.QuestionEmbedding.__init__": {"fullname": "vanna.types.QuestionEmbedding.__init__", "modulename": "vanna.types", "qualname": "QuestionEmbedding.__init__", "kind": "function", "doc": "

\n", "signature": "(question: vanna.types.Question, embedding: List[float])"}, "vanna.types.QuestionEmbedding.question": {"fullname": "vanna.types.QuestionEmbedding.question", "modulename": "vanna.types", "qualname": "QuestionEmbedding.question", "kind": "variable", "doc": "

\n", "annotation": ": vanna.types.Question"}, "vanna.types.QuestionEmbedding.embedding": {"fullname": "vanna.types.QuestionEmbedding.embedding", "modulename": "vanna.types", "qualname": "QuestionEmbedding.embedding", "kind": "variable", "doc": "

\n", "annotation": ": List[float]"}, "vanna.types.Connection": {"fullname": "vanna.types.Connection", "modulename": "vanna.types", "qualname": "Connection", "kind": "class", "doc": "

\n"}, "vanna.types.SQLAnswer": {"fullname": "vanna.types.SQLAnswer", "modulename": "vanna.types", "qualname": "SQLAnswer", "kind": "class", "doc": "

\n"}, "vanna.types.SQLAnswer.__init__": {"fullname": "vanna.types.SQLAnswer.__init__", "modulename": "vanna.types", "qualname": "SQLAnswer.__init__", "kind": "function", "doc": "

\n", "signature": "(raw_answer: str, prefix: str, postfix: str, sql: str)"}, "vanna.types.SQLAnswer.raw_answer": {"fullname": "vanna.types.SQLAnswer.raw_answer", "modulename": "vanna.types", "qualname": "SQLAnswer.raw_answer", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.SQLAnswer.prefix": {"fullname": "vanna.types.SQLAnswer.prefix", "modulename": "vanna.types", "qualname": "SQLAnswer.prefix", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.SQLAnswer.postfix": {"fullname": "vanna.types.SQLAnswer.postfix", "modulename": "vanna.types", "qualname": "SQLAnswer.postfix", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.SQLAnswer.sql": {"fullname": "vanna.types.SQLAnswer.sql", "modulename": "vanna.types", "qualname": "SQLAnswer.sql", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Explanation": {"fullname": "vanna.types.Explanation", "modulename": "vanna.types", "qualname": "Explanation", "kind": "class", "doc": "

\n"}, "vanna.types.Explanation.__init__": {"fullname": "vanna.types.Explanation.__init__", "modulename": "vanna.types", "qualname": "Explanation.__init__", "kind": "function", "doc": "

\n", "signature": "(explanation: str)"}, "vanna.types.Explanation.explanation": {"fullname": "vanna.types.Explanation.explanation", "modulename": "vanna.types", "qualname": "Explanation.explanation", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.DataResult": {"fullname": "vanna.types.DataResult", "modulename": "vanna.types", "qualname": "DataResult", "kind": "class", "doc": "

\n"}, "vanna.types.DataResult.__init__": {"fullname": "vanna.types.DataResult.__init__", "modulename": "vanna.types", "qualname": "DataResult.__init__", "kind": "function", "doc": "

\n", "signature": "(\tquestion: str | None,\tsql: str | None,\ttable_markdown: str,\terror: str | None,\tcorrection_attempts: int)"}, "vanna.types.DataResult.question": {"fullname": "vanna.types.DataResult.question", "modulename": "vanna.types", "qualname": "DataResult.question", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "vanna.types.DataResult.sql": {"fullname": "vanna.types.DataResult.sql", "modulename": "vanna.types", "qualname": "DataResult.sql", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "vanna.types.DataResult.table_markdown": {"fullname": "vanna.types.DataResult.table_markdown", "modulename": "vanna.types", "qualname": "DataResult.table_markdown", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.DataResult.error": {"fullname": "vanna.types.DataResult.error", "modulename": "vanna.types", "qualname": "DataResult.error", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "vanna.types.DataResult.correction_attempts": {"fullname": "vanna.types.DataResult.correction_attempts", "modulename": "vanna.types", "qualname": "DataResult.correction_attempts", "kind": "variable", "doc": "

\n", "annotation": ": int"}, "vanna.types.PlotlyResult": {"fullname": "vanna.types.PlotlyResult", "modulename": "vanna.types", "qualname": "PlotlyResult", "kind": "class", "doc": "

\n"}, "vanna.types.PlotlyResult.__init__": {"fullname": "vanna.types.PlotlyResult.__init__", "modulename": "vanna.types", "qualname": "PlotlyResult.__init__", "kind": "function", "doc": "

\n", "signature": "(plotly_code: str)"}, "vanna.types.PlotlyResult.plotly_code": {"fullname": "vanna.types.PlotlyResult.plotly_code", "modulename": "vanna.types", "qualname": "PlotlyResult.plotly_code", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.WarehouseDefinition": {"fullname": "vanna.types.WarehouseDefinition", "modulename": "vanna.types", "qualname": "WarehouseDefinition", "kind": "class", "doc": "

\n"}, "vanna.types.WarehouseDefinition.__init__": {"fullname": "vanna.types.WarehouseDefinition.__init__", "modulename": "vanna.types", "qualname": "WarehouseDefinition.__init__", "kind": "function", "doc": "

\n", "signature": "(name: str, tables: List[vanna.types.TableDefinition])"}, "vanna.types.WarehouseDefinition.name": {"fullname": "vanna.types.WarehouseDefinition.name", "modulename": "vanna.types", "qualname": "WarehouseDefinition.name", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.WarehouseDefinition.tables": {"fullname": "vanna.types.WarehouseDefinition.tables", "modulename": "vanna.types", "qualname": "WarehouseDefinition.tables", "kind": "variable", "doc": "

\n", "annotation": ": List[vanna.types.TableDefinition]"}, "vanna.types.TableDefinition": {"fullname": "vanna.types.TableDefinition", "modulename": "vanna.types", "qualname": "TableDefinition", "kind": "class", "doc": "

\n"}, "vanna.types.TableDefinition.__init__": {"fullname": "vanna.types.TableDefinition.__init__", "modulename": "vanna.types", "qualname": "TableDefinition.__init__", "kind": "function", "doc": "

\n", "signature": "(\tschema_name: str,\ttable_name: str,\tddl: str | None,\tcolumns: List[vanna.types.ColumnDefinition])"}, "vanna.types.TableDefinition.schema_name": {"fullname": "vanna.types.TableDefinition.schema_name", "modulename": "vanna.types", "qualname": "TableDefinition.schema_name", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.TableDefinition.table_name": {"fullname": "vanna.types.TableDefinition.table_name", "modulename": "vanna.types", "qualname": "TableDefinition.table_name", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.TableDefinition.ddl": {"fullname": "vanna.types.TableDefinition.ddl", "modulename": "vanna.types", "qualname": "TableDefinition.ddl", "kind": "variable", "doc": "

\n", "annotation": ": str | None"}, "vanna.types.TableDefinition.columns": {"fullname": "vanna.types.TableDefinition.columns", "modulename": "vanna.types", "qualname": "TableDefinition.columns", "kind": "variable", "doc": "

\n", "annotation": ": List[vanna.types.ColumnDefinition]"}, "vanna.types.ColumnDefinition": {"fullname": "vanna.types.ColumnDefinition", "modulename": "vanna.types", "qualname": "ColumnDefinition", "kind": "class", "doc": "

\n"}, "vanna.types.ColumnDefinition.__init__": {"fullname": "vanna.types.ColumnDefinition.__init__", "modulename": "vanna.types", "qualname": "ColumnDefinition.__init__", "kind": "function", "doc": "

\n", "signature": "(\tname: str,\ttype: str,\tis_primary_key: bool,\tis_foreign_key: bool,\tforeign_key_table: str,\tforeign_key_column: str)"}, "vanna.types.ColumnDefinition.name": {"fullname": "vanna.types.ColumnDefinition.name", "modulename": "vanna.types", "qualname": "ColumnDefinition.name", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.ColumnDefinition.type": {"fullname": "vanna.types.ColumnDefinition.type", "modulename": "vanna.types", "qualname": "ColumnDefinition.type", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.ColumnDefinition.is_primary_key": {"fullname": "vanna.types.ColumnDefinition.is_primary_key", "modulename": "vanna.types", "qualname": "ColumnDefinition.is_primary_key", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "vanna.types.ColumnDefinition.is_foreign_key": {"fullname": "vanna.types.ColumnDefinition.is_foreign_key", "modulename": "vanna.types", "qualname": "ColumnDefinition.is_foreign_key", "kind": "variable", "doc": "

\n", "annotation": ": bool"}, "vanna.types.ColumnDefinition.foreign_key_table": {"fullname": "vanna.types.ColumnDefinition.foreign_key_table", "modulename": "vanna.types", "qualname": "ColumnDefinition.foreign_key_table", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.ColumnDefinition.foreign_key_column": {"fullname": "vanna.types.ColumnDefinition.foreign_key_column", "modulename": "vanna.types", "qualname": "ColumnDefinition.foreign_key_column", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Diagram": {"fullname": "vanna.types.Diagram", "modulename": "vanna.types", "qualname": "Diagram", "kind": "class", "doc": "

\n"}, "vanna.types.Diagram.__init__": {"fullname": "vanna.types.Diagram.__init__", "modulename": "vanna.types", "qualname": "Diagram.__init__", "kind": "function", "doc": "

\n", "signature": "(raw: str, mermaid_code: str)"}, "vanna.types.Diagram.raw": {"fullname": "vanna.types.Diagram.raw", "modulename": "vanna.types", "qualname": "Diagram.raw", "kind": "variable", "doc": "

\n", "annotation": ": str"}, "vanna.types.Diagram.mermaid_code": {"fullname": "vanna.types.Diagram.mermaid_code", "modulename": "vanna.types", "qualname": "Diagram.mermaid_code", "kind": "variable", "doc": "

\n", "annotation": ": str"}}, "docInfo": {"vanna": {"qualname": 0, "fullname": 1, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 506}, "vanna.api_key": {"qualname": 2, "fullname": 3, "annotation": 2, "default_value": 1, "signature": 0, "bases": 0, "doc": 3}, "vanna.set_org": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 22}, "vanna.store_sql": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 35}, "vanna.remove_sql": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 19, "bases": 0, "doc": 27}, "vanna.generate_sql": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 43}, "vanna.generate_plotly_code": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 75, "bases": 0, "doc": 63}, "vanna.get_plotly_figure": {"qualname": 3, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 89, "bases": 0, "doc": 45}, "vanna.get_results": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 50, "bases": 0, "doc": 78}, "vanna.generate_explanation": {"qualname": 2, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 112}, "vanna.types": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Status": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Status.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "vanna.types.Status.success": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Status.message": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 127, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.id": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.question": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.answer": {"qualname": 2, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.data": {"qualname": 2, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.FullQuestionDocument.plotly": {"qualname": 2, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionSQLPair": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionSQLPair.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 24, "bases": 0, "doc": 3}, "vanna.types.QuestionSQLPair.question": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionSQLPair.sql": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Organization": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Organization.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 59, "bases": 0, "doc": 3}, "vanna.types.Organization.name": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Organization.user": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Organization.connection": {"qualname": 2, "fullname": 4, "annotation": 6, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionId": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionId.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "vanna.types.QuestionId.id": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Question": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Question.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "vanna.types.Question.question": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Followup": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Followup.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "vanna.types.Followup.followup": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionEmbedding": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionEmbedding.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 3}, "vanna.types.QuestionEmbedding.question": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.QuestionEmbedding.embedding": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Connection": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 45, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer.raw_answer": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer.prefix": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer.postfix": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.SQLAnswer.sql": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Explanation": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Explanation.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 3}, "vanna.types.Explanation.explanation": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 79, "bases": 0, "doc": 3}, "vanna.types.DataResult.question": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult.sql": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult.table_markdown": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult.error": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.DataResult.correction_attempts": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.PlotlyResult": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.PlotlyResult.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 15, "bases": 0, "doc": 3}, "vanna.types.PlotlyResult.plotly_code": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.WarehouseDefinition": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.WarehouseDefinition.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 40, "bases": 0, "doc": 3}, "vanna.types.WarehouseDefinition.name": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.WarehouseDefinition.tables": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.TableDefinition": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.TableDefinition.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 72, "bases": 0, "doc": 3}, "vanna.types.TableDefinition.schema_name": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.TableDefinition.table_name": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.TableDefinition.ddl": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.TableDefinition.columns": {"qualname": 2, "fullname": 4, "annotation": 4, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 78, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.name": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.type": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.is_primary_key": {"qualname": 4, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.is_foreign_key": {"qualname": 4, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.foreign_key_table": {"qualname": 4, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.ColumnDefinition.foreign_key_column": {"qualname": 4, "fullname": 6, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Diagram": {"qualname": 1, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Diagram.__init__": {"qualname": 3, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 25, "bases": 0, "doc": 3}, "vanna.types.Diagram.raw": {"qualname": 2, "fullname": 4, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "vanna.types.Diagram.mermaid_code": {"qualname": 3, "fullname": 5, "annotation": 2, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}}, "length": 86, "save": true}, "index": {"qualname": {"root": {"docs": {"vanna.types.Status.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 16, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "i": {"docs": {"vanna.api_key": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 1}}}}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"vanna.api_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 5}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"vanna.set_org": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.store_sql": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.Status": {"tf": 1}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.Status.success": {"tf": 1}, "vanna.types.Status.message": {"tf": 1}}, "df": 4}}}}}, "q": {"docs": {}, "df": 0, "l": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}}, "df": 6, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.SQLAnswer": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}}, "df": 6}}}}}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.Status.success": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.TableDefinition.schema_name": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {"vanna.set_org": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}}, "df": 5}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"vanna.remove_sql": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "w": {"docs": {"vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}}, "df": 2}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 3}}}}}}, "t": {"docs": {"vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}}, "df": 4, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.PlotlyResult": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}}, "df": 3}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.prefix": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.postfix": {"tf": 1}}, "df": 1}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization.connection": {"tf": 1}, "vanna.types.Connection": {"tf": 1}}, "df": 2}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 8}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}}, "df": 7}}}}}}}}}}}}}}}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"vanna.types.Followup": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1.4142135623730951}}, "df": 3}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 3}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.generate_explanation": {"tf": 1}, "vanna.types.Explanation": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}}}}, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.types.QuestionEmbedding.embedding": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.DataResult.error": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.Status.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 16}}}, "d": {"docs": {"vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}}, "df": 2}, "s": {"docs": {"vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}}, "df": 2}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Status.message": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.table_markdown": {"tf": 1}}, "df": 1}}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.Question": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Question.question": {"tf": 1.4142135623730951}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}}, "df": 7, "s": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.QuestionSQLPair": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}}, "df": 4}}}}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.QuestionId": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}}, "df": 3}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.types.QuestionEmbedding": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.FullQuestionDocument.data": {"tf": 1}}, "df": 1, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.DataResult": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 7}}}}}}}}}, "d": {"docs": {}, "df": 0, "l": {"docs": {"vanna.types.TableDefinition.ddl": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {"vanna.types.Diagram": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 4}}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Organization.name": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}}, "df": 5}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.Organization.user": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}}, "df": 3, "s": {"docs": {"vanna.types.WarehouseDefinition.tables": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.TableDefinition": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 6}}}}}}}}}}}}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.ColumnDefinition.type": {"tf": 1}}, "df": 1}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.WarehouseDefinition": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}}}}}}}, "fullname": {"root": {"docs": {"vanna.types.Status.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 16, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {"vanna": {"tf": 1}, "vanna.api_key": {"tf": 1}, "vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}, "vanna.types": {"tf": 1}, "vanna.types.Status": {"tf": 1}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.Status.success": {"tf": 1}, "vanna.types.Status.message": {"tf": 1}, "vanna.types.FullQuestionDocument": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.QuestionSQLPair": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.Organization": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}, "vanna.types.QuestionId": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}, "vanna.types.Question": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Question.question": {"tf": 1}, "vanna.types.Followup": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1}, "vanna.types.QuestionEmbedding": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1}, "vanna.types.Connection": {"tf": 1}, "vanna.types.SQLAnswer": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.Explanation": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1}, "vanna.types.DataResult": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.DataResult.correction_attempts": {"tf": 1}, "vanna.types.PlotlyResult": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.WarehouseDefinition": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}, "vanna.types.TableDefinition": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}, "vanna.types.ColumnDefinition": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}, "vanna.types.Diagram": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 86}}}}}, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "i": {"docs": {"vanna.api_key": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 1}}}}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"vanna.api_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 5}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {"vanna.set_org": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.store_sql": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.Status": {"tf": 1}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.Status.success": {"tf": 1}, "vanna.types.Status.message": {"tf": 1}}, "df": 4}}}}}, "q": {"docs": {}, "df": 0, "l": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}}, "df": 6, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.SQLAnswer": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}}, "df": 6}}}}}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.Status.success": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.TableDefinition.schema_name": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {"vanna.set_org": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}}, "df": 5}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"vanna.remove_sql": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "w": {"docs": {"vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}}, "df": 2}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 3}}}}}}, "t": {"docs": {"vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 2}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}}, "df": 4, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.PlotlyResult": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}}, "df": 3}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.prefix": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.postfix": {"tf": 1}}, "df": 1}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization.connection": {"tf": 1}, "vanna.types.Connection": {"tf": 1}}, "df": 2}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 8}}}}}}}}}}}}}}}}, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}}, "df": 7}}}}}}}}}}}}}}}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"vanna.types.Followup": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1.4142135623730951}}, "df": 3}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}}, "df": 3}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.generate_explanation": {"tf": 1}, "vanna.types.Explanation": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}}}}, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.types.QuestionEmbedding.embedding": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.DataResult.error": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.ColumnDefinition.type": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna.types": {"tf": 1}, "vanna.types.Status": {"tf": 1}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.Status.success": {"tf": 1}, "vanna.types.Status.message": {"tf": 1}, "vanna.types.FullQuestionDocument": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.QuestionSQLPair": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.Organization": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}, "vanna.types.QuestionId": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}, "vanna.types.Question": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Question.question": {"tf": 1}, "vanna.types.Followup": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1}, "vanna.types.QuestionEmbedding": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1}, "vanna.types.Connection": {"tf": 1}, "vanna.types.SQLAnswer": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.Explanation": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1}, "vanna.types.DataResult": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.DataResult.correction_attempts": {"tf": 1}, "vanna.types.PlotlyResult": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.WarehouseDefinition": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}, "vanna.types.TableDefinition": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}, "vanna.types.ColumnDefinition": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}, "vanna.types.Diagram": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 76}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}}, "df": 3, "s": {"docs": {"vanna.types.WarehouseDefinition.tables": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.TableDefinition": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 6}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.Status.__init__": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 16}}}, "d": {"docs": {"vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}}, "df": 2}, "s": {"docs": {"vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}}, "df": 2}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Status.message": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.table_markdown": {"tf": 1}}, "df": 1}}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.Question": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Question.question": {"tf": 1.4142135623730951}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}}, "df": 7, "s": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.QuestionSQLPair": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}}, "df": 4}}}}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.QuestionId": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}}, "df": 3}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.types.QuestionEmbedding": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.FullQuestionDocument.data": {"tf": 1}}, "df": 1, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.DataResult": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 7}}}}}}}}}, "d": {"docs": {}, "df": 0, "l": {"docs": {"vanna.types.TableDefinition.ddl": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {"vanna.types.Diagram": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 4}}}}}}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Organization.name": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}}, "df": 5}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.Organization.user": {"tf": 1}}, "df": 1}}}}, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.WarehouseDefinition": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}}, "df": 4}}}}}}}}}}}}}}}}}}}}}, "annotation": {"root": {"docs": {"vanna.api_key": {"tf": 1}, "vanna.types.Status.success": {"tf": 1}, "vanna.types.Status.message": {"tf": 1}, "vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1.4142135623730951}, "vanna.types.FullQuestionDocument.data": {"tf": 1.4142135623730951}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1.4142135623730951}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1.4142135623730951}, "vanna.types.Organization.connection": {"tf": 1.4142135623730951}, "vanna.types.QuestionId.id": {"tf": 1}, "vanna.types.Question.question": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1.4142135623730951}, "vanna.types.DataResult.sql": {"tf": 1.4142135623730951}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1.4142135623730951}, "vanna.types.DataResult.correction_attempts": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1.4142135623730951}, "vanna.types.TableDefinition.columns": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 43, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"vanna.api_key": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"vanna.types.Status.success": {"tf": 1}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1}}, "df": 3}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.Status.message": {"tf": 1}, "vanna.types.QuestionSQLPair.question": {"tf": 1}, "vanna.types.QuestionSQLPair.sql": {"tf": 1}, "vanna.types.Organization.name": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.QuestionId.id": {"tf": 1}, "vanna.types.Question.question": {"tf": 1}, "vanna.types.Followup.followup": {"tf": 1}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1}, "vanna.types.SQLAnswer.prefix": {"tf": 1}, "vanna.types.SQLAnswer.postfix": {"tf": 1}, "vanna.types.SQLAnswer.sql": {"tf": 1}, "vanna.types.Explanation.explanation": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.table_markdown": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1}, "vanna.types.WarehouseDefinition.name": {"tf": 1}, "vanna.types.TableDefinition.schema_name": {"tf": 1}, "vanna.types.TableDefinition.table_name": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}, "vanna.types.ColumnDefinition.name": {"tf": 1}, "vanna.types.ColumnDefinition.type": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1}, "vanna.types.Diagram.raw": {"tf": 1}, "vanna.types.Diagram.mermaid_code": {"tf": 1}}, "df": 28}}, "q": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.FullQuestionDocument.answer": {"tf": 1}}, "df": 1}}}}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}}, "df": 7}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.FullQuestionDocument.id": {"tf": 1}, "vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}, "vanna.types.WarehouseDefinition.tables": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 9}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.WarehouseDefinition.tables": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.FullQuestionDocument.question": {"tf": 1}, "vanna.types.QuestionEmbedding.question": {"tf": 1}}, "df": 2, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.FullQuestionDocument.id": {"tf": 1}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.FullQuestionDocument.answer": {"tf": 1}, "vanna.types.FullQuestionDocument.data": {"tf": 1}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1}, "vanna.types.Organization.user": {"tf": 1}, "vanna.types.Organization.connection": {"tf": 1}, "vanna.types.DataResult.question": {"tf": 1}, "vanna.types.DataResult.sql": {"tf": 1}, "vanna.types.DataResult.error": {"tf": 1}, "vanna.types.TableDefinition.ddl": {"tf": 1}}, "df": 9}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument.data": {"tf": 1}}, "df": 1}}}}}}}}}}, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument.plotly": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization.connection": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "[": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.QuestionEmbedding.embedding": {"tf": 1}}, "df": 1}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.WarehouseDefinition.tables": {"tf": 1}, "vanna.types.TableDefinition.columns": {"tf": 1}}, "df": 2}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.DataResult.correction_attempts": {"tf": 1}}, "df": 1}}}}}, "default_value": {"root": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"vanna.api_key": {"tf": 1}}, "df": 1}}}}}}, "signature": {"root": {"docs": {"vanna.set_org": {"tf": 4}, "vanna.store_sql": {"tf": 4.898979485566356}, "vanna.remove_sql": {"tf": 4}, "vanna.generate_sql": {"tf": 4.58257569495584}, "vanna.generate_plotly_code": {"tf": 7.874007874011811}, "vanna.get_plotly_figure": {"tf": 8.426149773176359}, "vanna.get_results": {"tf": 6.324555320336759}, "vanna.generate_explanation": {"tf": 4.58257569495584}, "vanna.types.Status.__init__": {"tf": 4.47213595499958}, "vanna.types.FullQuestionDocument.__init__": {"tf": 10.198039027185569}, "vanna.types.QuestionSQLPair.__init__": {"tf": 4.47213595499958}, "vanna.types.Organization.__init__": {"tf": 7}, "vanna.types.QuestionId.__init__": {"tf": 3.4641016151377544}, "vanna.types.Question.__init__": {"tf": 3.4641016151377544}, "vanna.types.Followup.__init__": {"tf": 3.4641016151377544}, "vanna.types.QuestionEmbedding.__init__": {"tf": 5.744562646538029}, "vanna.types.SQLAnswer.__init__": {"tf": 6}, "vanna.types.Explanation.__init__": {"tf": 3.4641016151377544}, "vanna.types.DataResult.__init__": {"tf": 8}, "vanna.types.PlotlyResult.__init__": {"tf": 3.4641016151377544}, "vanna.types.WarehouseDefinition.__init__": {"tf": 5.744562646538029}, "vanna.types.TableDefinition.__init__": {"tf": 7.615773105863909}, "vanna.types.ColumnDefinition.__init__": {"tf": 7.615773105863909}, "vanna.types.Diagram.__init__": {"tf": 4.47213595499958}}, "df": 24, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {"vanna.set_org": {"tf": 1}}, "df": 1}}, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "s": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1.4142135623730951}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 1.7320508075688772}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1.4142135623730951}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1.4142135623730951}, "vanna.types.Organization.__init__": {"tf": 1.4142135623730951}, "vanna.types.QuestionId.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.Followup.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 2}, "vanna.types.Explanation.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 2}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.__init__": {"tf": 2}, "vanna.types.Diagram.__init__": {"tf": 1.4142135623730951}}, "df": 22}}, "q": {"docs": {}, "df": 0, "l": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.DataResult.__init__": {"tf": 1}}, "df": 7, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.Status.__init__": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"vanna.set_org": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1.7320508075688772}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1.7320508075688772}, "vanna.types.Organization.__init__": {"tf": 1.4142135623730951}, "vanna.types.DataResult.__init__": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 9}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1.4142135623730951}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}}, "df": 4}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1.4142135623730951}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1}, "vanna.types.Question.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1.4142135623730951}, "vanna.types.DataResult.__init__": {"tf": 1}}, "df": 9, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}, "b": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.types.Status.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1.4142135623730951}}, "df": 5}}}}, "d": {"docs": {}, "df": 0, "f": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 2}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}}, "df": 1, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 3}}}}}, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "k": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}}}}, "d": {"docs": {}, "df": 0, "l": {"docs": {"vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 1}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 3}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"vanna.get_plotly_figure": {"tf": 1.4142135623730951}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}}, "df": 3, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.__init__": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "x": {"docs": {"vanna.types.SQLAnswer.__init__": {"tf": 1}}, "df": 1}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 3}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1}, "vanna.types.PlotlyResult.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 3}}, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Organization.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "s": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 3}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {"vanna.types.Followup.__init__": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.QuestionEmbedding.__init__": {"tf": 1}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.Status.__init__": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.Diagram.__init__": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 2.23606797749979}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 5}}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}, "vanna.types.ColumnDefinition.__init__": {"tf": 1}}, "df": 3, "s": {"docs": {"vanna.types.WarehouseDefinition.__init__": {"tf": 1}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.WarehouseDefinition.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.QuestionId.__init__": {"tf": 1}}, "df": 2}, "n": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}}, "df": 1}}, "s": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 1.4142135623730951}}, "df": 1}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 2.23606797749979}, "vanna.types.Organization.__init__": {"tf": 1}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 5}}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.FullQuestionDocument.__init__": {"tf": 1}, "vanna.types.SQLAnswer.__init__": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.Organization.__init__": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.types.QuestionEmbedding.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.types.Explanation.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna.types.DataResult.__init__": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"vanna.types.QuestionEmbedding.__init__": {"tf": 1}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1}, "vanna.types.TableDefinition.__init__": {"tf": 1}}, "df": 3}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "w": {"docs": {"vanna.types.SQLAnswer.__init__": {"tf": 1}, "vanna.types.Diagram.__init__": {"tf": 1}}, "df": 2}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"vanna.types.ColumnDefinition.__init__": {"tf": 2}}, "df": 1}}}}}, "bases": {"root": {"docs": {}, "df": 0}}, "doc": {"root": {"1": {"0": {"docs": {"vanna": {"tf": 2}}, "df": 1}, "docs": {}, "df": 0}, "3": {"9": {"docs": {"vanna": {"tf": 4.47213595499958}, "vanna.generate_explanation": {"tf": 2}}, "df": 2}, "docs": {}, "df": 0}, "docs": {"vanna": {"tf": 18}, "vanna.api_key": {"tf": 1.7320508075688772}, "vanna.set_org": {"tf": 2.6457513110645907}, "vanna.store_sql": {"tf": 2.8284271247461903}, "vanna.remove_sql": {"tf": 2.6457513110645907}, "vanna.generate_sql": {"tf": 3.1622776601683795}, "vanna.generate_plotly_code": {"tf": 3.4641016151377544}, "vanna.get_plotly_figure": {"tf": 3.3166247903554}, "vanna.get_results": {"tf": 5.744562646538029}, "vanna.generate_explanation": {"tf": 7.745966692414834}, "vanna.types": {"tf": 1.7320508075688772}, "vanna.types.Status": {"tf": 1.7320508075688772}, "vanna.types.Status.__init__": {"tf": 1.7320508075688772}, "vanna.types.Status.success": {"tf": 1.7320508075688772}, "vanna.types.Status.message": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.__init__": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.id": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.question": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.answer": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.data": {"tf": 1.7320508075688772}, "vanna.types.FullQuestionDocument.plotly": {"tf": 1.7320508075688772}, "vanna.types.QuestionSQLPair": {"tf": 1.7320508075688772}, "vanna.types.QuestionSQLPair.__init__": {"tf": 1.7320508075688772}, "vanna.types.QuestionSQLPair.question": {"tf": 1.7320508075688772}, "vanna.types.QuestionSQLPair.sql": {"tf": 1.7320508075688772}, "vanna.types.Organization": {"tf": 1.7320508075688772}, "vanna.types.Organization.__init__": {"tf": 1.7320508075688772}, "vanna.types.Organization.name": {"tf": 1.7320508075688772}, "vanna.types.Organization.user": {"tf": 1.7320508075688772}, "vanna.types.Organization.connection": {"tf": 1.7320508075688772}, "vanna.types.QuestionId": {"tf": 1.7320508075688772}, "vanna.types.QuestionId.__init__": {"tf": 1.7320508075688772}, "vanna.types.QuestionId.id": {"tf": 1.7320508075688772}, "vanna.types.Question": {"tf": 1.7320508075688772}, "vanna.types.Question.__init__": {"tf": 1.7320508075688772}, "vanna.types.Question.question": {"tf": 1.7320508075688772}, "vanna.types.Followup": {"tf": 1.7320508075688772}, "vanna.types.Followup.__init__": {"tf": 1.7320508075688772}, "vanna.types.Followup.followup": {"tf": 1.7320508075688772}, "vanna.types.QuestionEmbedding": {"tf": 1.7320508075688772}, "vanna.types.QuestionEmbedding.__init__": {"tf": 1.7320508075688772}, "vanna.types.QuestionEmbedding.question": {"tf": 1.7320508075688772}, "vanna.types.QuestionEmbedding.embedding": {"tf": 1.7320508075688772}, "vanna.types.Connection": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer.__init__": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer.raw_answer": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer.prefix": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer.postfix": {"tf": 1.7320508075688772}, "vanna.types.SQLAnswer.sql": {"tf": 1.7320508075688772}, "vanna.types.Explanation": {"tf": 1.7320508075688772}, "vanna.types.Explanation.__init__": {"tf": 1.7320508075688772}, "vanna.types.Explanation.explanation": {"tf": 1.7320508075688772}, "vanna.types.DataResult": {"tf": 1.7320508075688772}, "vanna.types.DataResult.__init__": {"tf": 1.7320508075688772}, "vanna.types.DataResult.question": {"tf": 1.7320508075688772}, "vanna.types.DataResult.sql": {"tf": 1.7320508075688772}, "vanna.types.DataResult.table_markdown": {"tf": 1.7320508075688772}, "vanna.types.DataResult.error": {"tf": 1.7320508075688772}, "vanna.types.DataResult.correction_attempts": {"tf": 1.7320508075688772}, "vanna.types.PlotlyResult": {"tf": 1.7320508075688772}, "vanna.types.PlotlyResult.__init__": {"tf": 1.7320508075688772}, "vanna.types.PlotlyResult.plotly_code": {"tf": 1.7320508075688772}, "vanna.types.WarehouseDefinition": {"tf": 1.7320508075688772}, "vanna.types.WarehouseDefinition.__init__": {"tf": 1.7320508075688772}, "vanna.types.WarehouseDefinition.name": {"tf": 1.7320508075688772}, "vanna.types.WarehouseDefinition.tables": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.__init__": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.schema_name": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.table_name": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.ddl": {"tf": 1.7320508075688772}, "vanna.types.TableDefinition.columns": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.__init__": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.name": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.type": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.is_primary_key": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.is_foreign_key": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.foreign_key_table": {"tf": 1.7320508075688772}, "vanna.types.ColumnDefinition.foreign_key_column": {"tf": 1.7320508075688772}, "vanna.types.Diagram": {"tf": 1.7320508075688772}, "vanna.types.Diagram.__init__": {"tf": 1.7320508075688772}, "vanna.types.Diagram.raw": {"tf": 1.7320508075688772}, "vanna.types.Diagram.mermaid_code": {"tf": 1.7320508075688772}}, "df": 86, "a": {"docs": {"vanna": {"tf": 1}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1.4142135623730951}}, "df": 4, "i": {"docs": {"vanna": {"tf": 1}, "vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1.4142135623730951}}, "df": 8}, "p": {"docs": {}, "df": 0, "i": {"docs": {"vanna": {"tf": 1.7320508075688772}, "vanna.set_org": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 6}}, "s": {"docs": {"vanna": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 2}, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1.7320508075688772}}, "df": 1}, "g": {"docs": {}, "df": 0, "s": {"docs": {"vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 6}}}, "b": {"docs": {}, "df": 0, "c": {"docs": {"vanna": {"tf": 1}}, "df": 1}}, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "n": {"docs": {"vanna.generate_sql": {"tf": 1.7320508075688772}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1.7320508075688772}}, "df": 4, "d": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 3}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}, "y": {"docs": {"vanna": {"tf": 2.6457513110645907}}, "df": 1}, "s": {"docs": {}, "df": 0, "g": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.store_sql": {"tf": 1.4142135623730951}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1.7320508075688772}, "vanna.get_plotly_figure": {"tf": 1.4142135623730951}, "vanna.get_results": {"tf": 1.7320508075688772}, "vanna.generate_explanation": {"tf": 1}}, "df": 8, "p": {"docs": {"vanna": {"tf": 1.7320508075688772}}, "df": 1}}, "h": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 2.23606797749979}, "vanna.set_org": {"tf": 1.7320508075688772}, "vanna.store_sql": {"tf": 1.7320508075688772}, "vanna.remove_sql": {"tf": 1.4142135623730951}, "vanna.generate_sql": {"tf": 1.7320508075688772}, "vanna.generate_plotly_code": {"tf": 2.23606797749979}, "vanna.get_plotly_figure": {"tf": 1.7320508075688772}, "vanna.get_results": {"tf": 2.6457513110645907}, "vanna.generate_explanation": {"tf": 2}}, "df": 9}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"vanna.store_sql": {"tf": 1}}, "df": 1, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}}, "df": 2}}, "f": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 3}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1}, "a": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 2}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {"vanna": {"tf": 1.7320508075688772}, "vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 8}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {"vanna": {"tf": 2.8284271247461903}, "vanna.generate_explanation": {"tf": 1}}, "df": 2}}, "p": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 2}}}}}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"vanna": {"tf": 2.23606797749979}, "vanna.generate_plotly_code": {"tf": 2.23606797749979}, "vanna.get_plotly_figure": {"tf": 2.449489742783178}}, "df": 3}}}}}, "x": {"docs": {"vanna": {"tf": 1}}, "df": 1}, "d": {"docs": {"vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 2}}, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.remove_sql": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 4}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {"vanna": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1.7320508075688772}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna.set_org": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1.7320508075688772}}, "df": 3}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1.7320508075688772}, "vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 2}, "vanna.generate_explanation": {"tf": 1.4142135623730951}}, "df": 4}}}}}}, "t": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 3}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "h": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}}}, "s": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "l": {"docs": {"vanna": {"tf": 2.8284271247461903}, "vanna.store_sql": {"tf": 1.7320508075688772}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1.7320508075688772}, "vanna.generate_plotly_code": {"tf": 1.4142135623730951}, "vanna.get_results": {"tf": 2}, "vanna.generate_explanation": {"tf": 2.23606797749979}}, "df": 7}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1.7320508075688772}, "vanna.set_org": {"tf": 1}}, "df": 2}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1}}, "df": 2}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}, "vanna.store_sql": {"tf": 1.7320508075688772}}, "df": 2}}}, "r": {"docs": {"vanna.set_org": {"tf": 1}, "vanna.store_sql": {"tf": 1.4142135623730951}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 1.7320508075688772}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 6}, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"vanna": {"tf": 2}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 2}}}}}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna.generate_explanation": {"tf": 1.7320508075688772}}, "df": 1, "s": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}, "vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 4}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"vanna": {"tf": 1.7320508075688772}}, "df": 1}}}, "y": {"docs": {"vanna": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1}}, "df": 3, "g": {"docs": {"vanna": {"tf": 1}, "vanna.set_org": {"tf": 1}}, "df": 2, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna": {"tf": 1}, "vanna.set_org": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 3}}}}}}}, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "s": {"docs": {"vanna.get_plotly_figure": {"tf": 1}}, "df": 1}}}, "f": {"docs": {"vanna.get_results": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1.4142135623730951}}, "df": 2}}, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 2.449489742783178}, "vanna.set_org": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1}}, "df": 3}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1}, "vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 1.4142135623730951}, "vanna.generate_explanation": {"tf": 1}}, "df": 4}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"vanna": {"tf": 2.23606797749979}, "vanna.store_sql": {"tf": 1.7320508075688772}, "vanna.remove_sql": {"tf": 1.7320508075688772}, "vanna.generate_sql": {"tf": 1.4142135623730951}, "vanna.generate_plotly_code": {"tf": 1.4142135623730951}}, "df": 5}}}}}, "r": {"docs": {}, "df": 0, "y": {"docs": {"vanna.store_sql": {"tf": 1.4142135623730951}, "vanna.remove_sql": {"tf": 1}, "vanna.generate_sql": {"tf": 1.7320508075688772}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1.7320508075688772}, "vanna.generate_explanation": {"tf": 1.7320508075688772}}, "df": 6}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 2.449489742783178}, "vanna.generate_explanation": {"tf": 1.4142135623730951}}, "df": 2}}}}, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}}, "df": 1, "s": {"docs": {"vanna": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}, "vanna.get_results": {"tf": 1}}, "df": 2}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"vanna": {"tf": 1.7320508075688772}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "n": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 2}, "vanna.generate_plotly_code": {"tf": 2.23606797749979}, "vanna.get_plotly_figure": {"tf": 1.7320508075688772}}, "df": 3}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "s": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.get_results": {"tf": 1}}, "df": 2}}, "b": {"docs": {}, "df": 0, "y": {"docs": {"vanna": {"tf": 2}}, "df": 1}, "a": {"docs": {}, "df": 0, "r": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "c": {"docs": {"vanna": {"tf": 1}}, "df": 1}}, "f": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}, "vanna.get_results": {"tf": 1.7320508075688772}}, "df": 2}}}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"vanna": {"tf": 1.4142135623730951}, "vanna.store_sql": {"tf": 1}, "vanna.remove_sql": {"tf": 1}, "vanna.get_results": {"tf": 2}}, "df": 4}}}}, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_plotly_code": {"tf": 1.4142135623730951}, "vanna.get_plotly_figure": {"tf": 1.7320508075688772}}, "df": 2}}}}}}}}, "f": {"docs": {"vanna": {"tf": 2.449489742783178}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}}, "df": 3}, "b": {"docs": {"vanna": {"tf": 1}}, "df": 1}, "o": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}}}, "x": {"docs": {"vanna": {"tf": 1}}, "df": 1, "y": {"docs": {}, "df": 0, "z": {"docs": {"vanna": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"vanna.get_plotly_figure": {"tf": 1.4142135623730951}, "vanna.get_results": {"tf": 1.7320508075688772}}, "df": 2, "r": {"docs": {"vanna": {"tf": 1.4142135623730951}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 4}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"vanna": {"tf": 1}, "vanna.get_results": {"tf": 1.4142135623730951}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}}}}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"vanna.remove_sql": {"tf": 1.4142135623730951}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"vanna.generate_sql": {"tf": 1}, "vanna.generate_plotly_code": {"tf": 1}, "vanna.get_plotly_figure": {"tf": 1}, "vanna.get_results": {"tf": 1}, "vanna.generate_explanation": {"tf": 1}}, "df": 5}}}}}}, "u": {"docs": {}, "df": 0, "n": {"docs": {"vanna.get_results": {"tf": 1}}, "df": 1}}}, "j": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "n": {"docs": {"vanna.generate_explanation": {"tf": 1}}, "df": 1}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true}; + + // mirrored in build-search-index.js (part 1) + // Also split on html tags. this is a cheap heuristic, but good enough. + elasticlunr.tokenizer.setSeperator(/[\s\-.;&_'"=,()]+|<[^>]*>/); + + let searchIndex; + if (docs._isPrebuiltIndex) { + console.info("using precompiled search index"); + searchIndex = elasticlunr.Index.load(docs); + } else { + console.time("building search index"); + // mirrored in build-search-index.js (part 2) + searchIndex = elasticlunr(function () { + this.pipeline.remove(elasticlunr.stemmer); + this.pipeline.remove(elasticlunr.stopWordFilter); + this.addField("qualname"); + this.addField("fullname"); + this.addField("annotation"); + this.addField("default_value"); + this.addField("signature"); + this.addField("bases"); + this.addField("doc"); + this.setRef("fullname"); + }); + for (let doc of docs) { + searchIndex.addDoc(doc); + } + console.timeEnd("building search index"); + } + + return (term) => searchIndex.search(term, { + fields: { + qualname: {boost: 4}, + fullname: {boost: 2}, + annotation: {boost: 2}, + default_value: {boost: 2}, + signature: {boost: 2}, + bases: {boost: 2}, + doc: {boost: 1}, + }, + expand: true + }); +})(); \ No newline at end of file diff --git a/docs/vanna-py-overview.md b/docs/vanna-py-overview.md new file mode 100644 index 00000000..e7771d62 --- /dev/null +++ b/docs/vanna-py-overview.md @@ -0,0 +1,81 @@ +--- +marp: true +theme: gaia +_class: lead +paginate: true +backgroundColor: #111827 +color: #fff +header: 'Updated: 2023-05-22' +--- + + +![bg left:40% 80%](https://ask.vanna.ai/static/img/vanna.svg) + +# **Vanna.AI** +## Python Package + +For Natural Language to SQL +(and associated functionality) + +support@vanna.ai + +--- +# What can you do with **Vanna.AI**? + +**Vanna.AI** has a Python package that allows you to convert natural language to SQL. + +```python +import vanna as vn + +vn.api_key = 'vanna-key-...' # Set your API key +vn.set_org('') # Set your organization name + +my_question = 'What are the top 10 ABC by XYZ?' + +sql = vn.generate_sql(question=my_question, error_msg=None) +# SELECT * FROM table_name WHERE column_name = 'value' + +(my_df, error_msg) = vn.run_sql(cs: snowflake.Cursor, sql=sql) + +vn.generate_plotly_code(question=my_question, df=my_df) +# fig = px.bar(df, x='column_name', y='column_name') + +vn.run_plotly_code(plotly_code=fig, df=my_df) + +``` + +--- + +# Installation + +## Global Installation +```bash +pip install vanna +``` +or +```bash +pip3 install vanna +``` + +## Use a Virtual Environment +```bash +python3 -m venv venv +source venv/bin/activate +pip install vanna +``` + +--- \ No newline at end of file diff --git a/docs/vanna.html b/docs/vanna.html new file mode 100644 index 00000000..98fcfe82 --- /dev/null +++ b/docs/vanna.html @@ -0,0 +1,494 @@ + + + + + + + vanna API documentation + + + + + + + + + +
+
+

+vanna

+ +

A module to interact with the Vanna.AI API, providing the functionality to generate SQL explanations.

+ +
+
import vanna as vn
+
+vn.api_key = 'vanna-key-...' # Set your API key
+vn.set_org('') # Set your organization name
+
+vn.store_sql(question="Who are the top 10 customers by Sales?", sql="SELECT customer_name, sales FROM customers ORDER BY sales DESC LIMIT 10")
+
+my_question = 'What are the top 10 ABC by XYZ?'
+
+sql = vn.generate_sql(question=my_question, error_msg=None) 
+# SELECT * FROM table_name WHERE column_name = 'value'
+
+conn = snowflake.connector.connect(
+        user='my_user',
+        password='my_password',
+        account='my_account',
+        database='my_database',
+    )
+
+cs = conn.cursor()
+
+df = vn.get_results(cs, my_default_db, sql)
+
+plotly_code = vn.generate_plotly_code(question="Who are the top 10 customers by Sales?", sql=sql, df=df)
+# px.bar(df, x='column_name', y='column_name')
+
+fig = vn.get_plotly_figure(plotly_code=plotly_code, df=df)
+
+
+
+ + + + +
+
+
+ api_key: Optional[str] = +None + + +
+ + + + +
+
+
+ + def + set_org(org: str) -> None: + + +
+ + +

Set the organization name for the Vanna.AI API.

+ +

Args: + org (str): The organization name.

+
+ + +
+
+
+ + def + store_sql(question: str, sql: str) -> bool: + + +
+ + +

Store a question and its corresponding SQL query in the Vanna.AI database.

+ +

Args: + question (str): The question to store. + sql (str): The SQL query to store.

+
+ + +
+
+
+ + def + remove_sql(question: str) -> bool: + + +
+ + +

Remove a question and its corresponding SQL query from the Vanna.AI database.

+ +

Args: + question (str): The question to remove.

+
+ + +
+
+
+ + def + generate_sql(question: str) -> str | None: + + +
+ + +

Generate an SQL query using the Vanna.AI API.

+ +

Args: + question (str): The question to generate an SQL query for.

+ +

Returns: + str or None: The SQL query, or None if an error occurred.

+
+ + +
+
+
+ + def + generate_plotly_code( question: str | None, sql: str | None, df: pandas.core.frame.DataFrame) -> str | None: + + +
+ + +

Generate Plotly code using the Vanna.AI API.

+ +

Args: + question (str): The question to generate Plotly code for. + sql (str): The SQL query to generate Plotly code for. + df (pd.DataFrame): The dataframe to generate Plotly code for.

+ +

Returns: + str or None: The Plotly code, or None if an error occurred.

+
+ + +
+
+
+ + def + get_plotly_figure( plotly_code: str, df: pandas.core.frame.DataFrame, dark_mode: bool = True) -> plotly.graph_objs._figure.Figure | None: + + +
+ + +

Get a Plotly figure from a dataframe and Plotly code.

+ +

Args: + df (pd.DataFrame): The dataframe to use. + plotly_code (str): The Plotly code to use.

+ +

Returns: + plotly.graph_objs.Figure: The Plotly figure.

+
+ + +
+
+
+ + def + get_results(cs, default_database: str, sql: str) -> pandas.core.frame.DataFrame: + + +
+ + +

Get the results of an SQL query using the Vanna.AI API.

+ +
Parameters
+ +
    +
  • cs: The Snowflake cursor to use.
  • +
  • default_database: The default database to use (executed as "USE DATABASE {default_database};")
  • +
  • sql: The SQL query to run.
  • +
+ +
Returns
+ +
+

The results of the SQL query.

+
+
+ + +
+
+
+ + def + generate_explanation(sql: str) -> str | None: + + +
+ + +

Example

+ +
+
vn.generate_explanation(sql="SELECT * FROM students WHERE name = 'John Doe'")
+# 'AI Response'
+
+
+ +

Generate an explanation of an SQL query using the Vanna.AI API.

+ +
Parameters
+ +
    +
  • sql: The SQL query to explain.
  • +
+ +
Returns
+ +
+

The explanation of the SQL query, or None if an error occurred.

+
+
+ + +
+
+ + \ No newline at end of file diff --git a/docs/vanna/types.html b/docs/vanna/types.html new file mode 100644 index 00000000..aacf7c70 --- /dev/null +++ b/docs/vanna/types.html @@ -0,0 +1,1406 @@ + + + + + + + vanna.types API documentation + + + + + + + + + +
+
+

+vanna.types

+ + + + + +
+
+
+
@dataclass
+ + class + Status: + + +
+ + + + +
+
+ + Status(success: bool, message: str) + + +
+ + + + +
+
+
+ success: bool + + +
+ + + + +
+
+
+ message: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + FullQuestionDocument: + + +
+ + + + +
+
+ + FullQuestionDocument( id: vanna.types.QuestionId, question: vanna.types.Question, answer: vanna.types.SQLAnswer | None, data: vanna.types.DataResult | None, plotly: vanna.types.PlotlyResult | None) + + +
+ + + + +
+
+ + + + + +
+
+
+ question: vanna.types.Question + + +
+ + + + +
+
+
+ answer: vanna.types.SQLAnswer | None + + +
+ + + + +
+
+
+ data: vanna.types.DataResult | None + + +
+ + + + +
+
+
+ plotly: vanna.types.PlotlyResult | None + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + QuestionSQLPair: + + +
+ + + + +
+
+ + QuestionSQLPair(question: str, sql: str) + + +
+ + + + +
+
+
+ question: str + + +
+ + + + +
+
+
+ sql: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Organization: + + +
+ + + + +
+
+ + Organization( name: str, user: str | None, connection: vanna.types.Connection | None) + + +
+ + + + +
+
+
+ name: str + + +
+ + + + +
+
+
+ user: str | None + + +
+ + + + +
+
+
+ connection: vanna.types.Connection | None + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + QuestionId: + + +
+ + + + +
+
+ + QuestionId(id: str) + + +
+ + + + +
+
+
+ id: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Question: + + +
+ + + + +
+
+ + Question(question: str) + + +
+ + + + +
+
+
+ question: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Followup: + + +
+ + + + +
+
+ + Followup(followup: str) + + +
+ + + + +
+
+
+ followup: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + QuestionEmbedding: + + +
+ + + + +
+
+ + QuestionEmbedding(question: vanna.types.Question, embedding: List[float]) + + +
+ + + + +
+
+
+ question: vanna.types.Question + + +
+ + + + +
+
+
+ embedding: List[float] + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Connection: + + +
+ + + + +
+
+
+
@dataclass
+ + class + SQLAnswer: + + +
+ + + + +
+
+ + SQLAnswer(raw_answer: str, prefix: str, postfix: str, sql: str) + + +
+ + + + +
+
+
+ raw_answer: str + + +
+ + + + +
+
+
+ prefix: str + + +
+ + + + +
+
+
+ postfix: str + + +
+ + + + +
+
+
+ sql: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Explanation: + + +
+ + + + +
+
+ + Explanation(explanation: str) + + +
+ + + + +
+
+
+ explanation: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + DataResult: + + +
+ + + + +
+
+ + DataResult( question: str | None, sql: str | None, table_markdown: str, error: str | None, correction_attempts: int) + + +
+ + + + +
+
+
+ question: str | None + + +
+ + + + +
+
+
+ sql: str | None + + +
+ + + + +
+
+
+ table_markdown: str + + +
+ + + + +
+
+
+ error: str | None + + +
+ + + + +
+
+
+ correction_attempts: int + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + PlotlyResult: + + +
+ + + + +
+
+ + PlotlyResult(plotly_code: str) + + +
+ + + + +
+
+
+ plotly_code: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + WarehouseDefinition: + + +
+ + + + +
+
+ + WarehouseDefinition(name: str, tables: List[vanna.types.TableDefinition]) + + +
+ + + + +
+
+
+ name: str + + +
+ + + + +
+
+
+ tables: List[vanna.types.TableDefinition] + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + TableDefinition: + + +
+ + + + +
+
+ + TableDefinition( schema_name: str, table_name: str, ddl: str | None, columns: List[vanna.types.ColumnDefinition]) + + +
+ + + + +
+
+
+ schema_name: str + + +
+ + + + +
+
+
+ table_name: str + + +
+ + + + +
+
+
+ ddl: str | None + + +
+ + + + +
+
+
+ columns: List[vanna.types.ColumnDefinition] + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + ColumnDefinition: + + +
+ + + + +
+
+ + ColumnDefinition( name: str, type: str, is_primary_key: bool, is_foreign_key: bool, foreign_key_table: str, foreign_key_column: str) + + +
+ + + + +
+
+
+ name: str + + +
+ + + + +
+
+
+ type: str + + +
+ + + + +
+
+
+ is_primary_key: bool + + +
+ + + + +
+
+
+ is_foreign_key: bool + + +
+ + + + +
+
+
+ foreign_key_table: str + + +
+ + + + +
+
+
+ foreign_key_column: str + + +
+ + + + +
+
+
+
+
@dataclass
+ + class + Diagram: + + +
+ + + + +
+
+ + Diagram(raw: str, mermaid_code: str) + + +
+ + + + +
+
+
+ raw: str + + +
+ + + + +
+
+
+ mermaid_code: str + + +
+ + + + +
+
+
+ + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 95214500..5743d651 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "vanna" -version = "0.0.1" +version = "0.0.2" authors = [ { name="Zain Hoda", email="zain@vanna.ai" }, ] @@ -12,6 +12,9 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] +dependencies = [ + "requests", "tabulate", "plotly" +] [project.urls] "Homepage" = "https://github.com/vanna-ai/vanna-py" diff --git a/src/vanna/__init__.py b/src/vanna/__init__.py index 05a00516..7d1dc6a9 100644 --- a/src/vanna/__init__.py +++ b/src/vanna/__init__.py @@ -1 +1,281 @@ -print("Vanna.AI Imported") \ No newline at end of file +r''' +A module to interact with the Vanna.AI API, providing the functionality to generate SQL explanations. + +```python +import vanna as vn + +vn.api_key = 'vanna-key-...' # Set your API key +vn.set_org('') # Set your organization name + +vn.store_sql(question="Who are the top 10 customers by Sales?", sql="SELECT customer_name, sales FROM customers ORDER BY sales DESC LIMIT 10") + +my_question = 'What are the top 10 ABC by XYZ?' + +sql = vn.generate_sql(question=my_question, error_msg=None) +# SELECT * FROM table_name WHERE column_name = 'value' + +conn = snowflake.connector.connect( + user='my_user', + password='my_password', + account='my_account', + database='my_database', + ) + +cs = conn.cursor() + +df = vn.get_results(cs, my_default_db, sql) + +plotly_code = vn.generate_plotly_code(question="Who are the top 10 customers by Sales?", sql=sql, df=df) +# px.bar(df, x='column_name', y='column_name') + +fig = vn.get_plotly_figure(plotly_code=plotly_code, df=df) + +``` +''' +print("Vanna.AI Imported") + +import requests +import pandas as pd +import json +import dataclasses +import plotly +import plotly.express as px +import plotly.graph_objects as go +from .types import SQLAnswer, Explanation, QuestionSQLPair, Question, QuestionId, DataResult, PlotlyResult, Status +from typing import List, Dict, Any, Union, Optional + +api_key: Union[str, None] = None # API key for Vanna.AI +__org: Union[str, None] = None # Organization name for Vanna.AI +_endpoint = "https://ask.vanna.ai/rpc" + +def __rpc_call(method, params): + """ + Make a RPC call to the Vanna.AI API. + + Args: + method (str): The name of the method to call. + params (list): A list of parameters for the method. + + Returns: + dict: The JSON response from the API converted into a dictionary. + """ + global api_key + global __org + + if api_key is None: + raise Exception("API key not set") + + if __org is None: + raise Exception("Organization name not set") + + headers = { + 'Content-Type': 'application/json', + 'Vanna-Key': api_key, + 'Vanna-Org': __org + } + data = { + "method": method, + "params": [__dataclass_to_dict(obj) for obj in params] + } + + response = requests.post(_endpoint, headers=headers, data=json.dumps(data)) + return response.json() + +def __dataclass_to_dict(obj): + """ + Converts a dataclass object to a dictionary. + + Args: + obj (object): The dataclass object to convert. + + Returns: + dict: The dataclass object as a dictionary. + """ + return dataclasses.asdict(obj) + +def set_org(org: str) -> None: + """ + Set the organization name for the Vanna.AI API. + + Args: + org (str): The organization name. + """ + global __org + __org = org + +def store_sql(question: str, sql: str) -> bool: + """ + Store a question and its corresponding SQL query in the Vanna.AI database. + + Args: + question (str): The question to store. + sql (str): The SQL query to store. + """ + params = [QuestionSQLPair( + question=question, + sql=sql, + )] + + d = __rpc_call(method="store_sql", params=params) + + if 'result' not in d: + return False + + status = Status(**d['result']) + + return status.success + +def remove_sql(question: str) -> bool: + """ + Remove a question and its corresponding SQL query from the Vanna.AI database. + + Args: + question (str): The question to remove. + """ + params = [Question(question=question)] + + d = __rpc_call(method="remove_sql", params=params) + + if 'result' not in d: + return False + + status = Status(**d['result']) + + return status.success + +def generate_sql(question: str) -> str | None: + """ + Generate an SQL query using the Vanna.AI API. + + Args: + question (str): The question to generate an SQL query for. + + Returns: + str or None: The SQL query, or None if an error occurred. + """ + params = [Question(question=question)] + + d = __rpc_call(method="generate_sql_from_question", params=params) + + if 'result' not in d: + return None + + # Load the result into a dataclass + sql_answer = SQLAnswer(**d['result']) + + return sql_answer.sql + +def generate_plotly_code(question: str | None, sql: str | None, df: pd.DataFrame) -> str | None: + """ + Generate Plotly code using the Vanna.AI API. + + Args: + question (str): The question to generate Plotly code for. + sql (str): The SQL query to generate Plotly code for. + df (pd.DataFrame): The dataframe to generate Plotly code for. + + Returns: + str or None: The Plotly code, or None if an error occurred. + """ + params = [DataResult( + question=question, + sql=sql, + table_markdown=df.head().to_markdown(), + error=None, + correction_attempts=0, + )] + + d = __rpc_call(method="generate_plotly_code", params=params) + + if 'result' not in d: + return None + + # Load the result into a dataclass + plotly_code = PlotlyResult(**d['result']) + + return plotly_code.plotly_code + +def get_plotly_figure(plotly_code: str, df: pd.DataFrame, dark_mode: bool = True) -> plotly.graph_objs.Figure | None: + """ + Get a Plotly figure from a dataframe and Plotly code. + + Args: + df (pd.DataFrame): The dataframe to use. + plotly_code (str): The Plotly code to use. + + Returns: + plotly.graph_objs.Figure: The Plotly figure. + """ + ldict = {'df': df, 'px': px, 'go': go} + exec(plotly_code, globals(), ldict) + + fig = ldict.get('fig', None) + + if fig is None: + return None + + if dark_mode: + fig.update_layout(template="plotly_dark") + + return fig + +def get_results(cs, default_database: str, sql: str) -> pd.DataFrame: + """ + Get the results of an SQL query using the Vanna.AI API. + + :param cs: The Snowflake cursor to use. + :type cs: snowflake.connector.cursor.SnowflakeCursor + :param default_database: The default database to use (executed as "USE DATABASE {default_database};") + :type default_database: str + :param sql: The SQL query to run. + :type sql: str + + :return: The results of the SQL query. + :rtype: pd.DataFrame + """ + cs.execute(f"USE DATABASE {default_database}") + + cur = cs.execute(sql) + + results = cur.fetchall() + + # Create a pandas dataframe from the results + df = pd.DataFrame(results, columns=[desc[0] for desc in cur.description]) + + return df + + +def generate_explanation(sql: str) -> str | None: + """ + + ## Example + ```python + vn.generate_explanation(sql="SELECT * FROM students WHERE name = 'John Doe'") + # 'AI Response' + ``` + + Generate an explanation of an SQL query using the Vanna.AI API. + + :param sql: The SQL query to explain. + :type sql: str + + :return: The explanation of the SQL query, or None if an error occurred. + :rtype: str or None + + """ + params = [SQLAnswer( + raw_answer="", + prefix="", + postfix="", + sql=sql, + )] + + d = __rpc_call(method="generate_explanation", params=params) + + if 'result' not in d: + return None + + # Load the result into a dataclass + explanation = Explanation(**d['result']) + + return explanation.explanation diff --git a/src/vanna/types.py b/src/vanna/types.py new file mode 100644 index 00000000..59f3f9fb --- /dev/null +++ b/src/vanna/types.py @@ -0,0 +1,98 @@ +from __future__ import annotations +from typing import List +from dataclasses import dataclass + +@dataclass +class Status: + success: bool + message: str + +@dataclass +class FullQuestionDocument: + id: QuestionId + question: Question + answer: SQLAnswer | None + data: DataResult | None + plotly: PlotlyResult | None + +@dataclass +class QuestionSQLPair: + question: str + sql: str + +@dataclass +class Organization: + name: str + user: str | None + connection: Connection | None + +@dataclass +class QuestionId: + id: str + +@dataclass +class Question: + question: str + +@dataclass +class Followup: + followup: str + +@dataclass +class QuestionEmbedding: + question: Question + embedding: List[float] + +@dataclass +class Connection: + #TODO: implement + pass + +@dataclass +class SQLAnswer: + raw_answer: str + prefix: str + postfix: str + sql: str + +@dataclass +class Explanation: + explanation: str + +@dataclass +class DataResult: + question: str | None + sql: str | None + table_markdown: str + error: str | None + correction_attempts: int + +@dataclass +class PlotlyResult: + plotly_code: str + +@dataclass +class WarehouseDefinition: + name: str + tables: List[TableDefinition] + +@dataclass +class TableDefinition: + schema_name: str + table_name: str + ddl: str | None + columns: List[ColumnDefinition] + +@dataclass +class ColumnDefinition: + name: str + type: str + is_primary_key: bool + is_foreign_key: bool + foreign_key_table: str + foreign_key_column: str + +@dataclass +class Diagram: + raw: str + mermaid_code: str \ No newline at end of file