Skip to main content

A short description of your project

Project description

pre-commit install add this in instllation guidelines

plan:

  1. create graph. this will be configurable. using config yaml file graph will be built accordinly.
  2. define state. if no state is passed while creating graph then it will take the default state. state will be modfiable while building graph.
  3. add conditional edges. get config from yaml file
  4. table selector node
  5. graph builder willl return graph and mermaid diagram (done)
  6. logger setup (done)
  7. linter setup (done)
  8. final state id fix (done)
  9. memory options would be sqlite, memory, database, etc.

sample configurations

graph:

tables_selector : bool

query_reframer_yn : bool

query_reframer_metadata_yn: bool

query_reframer_examples_yn: bool

query_reframer_config_yn : bool

query_reframer_rag_yn : bool

intent_yn : bool

intent_ambiguity_yn : bool [TBD later]

intent_filterable_yn : bool [TBD later]

query_correcter_yn : bool

A graph class needs to be created here.

The graph will be created using the yaml file for the configuration that will be provided.

memory:

Options would be sqlite, memory, database, etc. (TBD)

#response_type : streaming or regular_run

There should be a method : get_graph() that returns the graph object using the configuration provided.

Also create a function that returns graph mermaid diagram.

The graph that returns streaming response or not should be decided based on the config provided.

There should be another method that returns the response from the graph using the input provided. (Either streaming or regular response)

from nl2query import IntentEngine

from nl2query import QueryBuilder

intent_engine = IntentEngine(examples=examples,config=config,metadata=metadata)

query_executor = QueryBuilder(examples=examples, prompt=prompt)

graph = NL2QueryGraph(config_file_path="config.yaml", intent_engine = intent_engine, query_executor=query_executor, ....)

  1. Implement QueryReframer, IntentEngine, QueryBuilder, class. these class will accept config, metadata, prompt, examples as required.
  2. Set up default prompt for each modules. If prompt is not passed then it will use default prompt.
  3. NL2QueryGraph will accept each modules object as params.
from nl2query import IntentEngine 
from nl2query import QueryBuilder

intent_engine = IntentEngine(examples=examples,config=config,metadata=metadata)
query_executor = QueryBuilder(examples=examples, prompt=prompt)


graph = NL2QueryGraph(config_file_path="config.yaml", intent_engine = intent_engine, query_executor=query_executor, ....) 
  1. prompts, configs, examples will be pass via config directly/ path for prompts will be defined in config yaml.
  2. compile and run the graph as per given configs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mle_nl2query-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mle_nl2query-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mle_nl2query-0.1.0.tar.gz.

File metadata

  • Download URL: mle_nl2query-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for mle_nl2query-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef9e7994955837eb2058c886a87b8e0e5f3d7df04f2ee770357a24ce4f4e5cde
MD5 744d4bb4e1a585aafdb95c91eb22125b
BLAKE2b-256 1ff62355a2f911a7dd139c643352fae19aef4e7468aa5d6cb63dc4fb3512fe68

See more details on using hashes here.

File details

Details for the file mle_nl2query-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mle_nl2query-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for mle_nl2query-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c1552684ab5127c1e8b7b2bb42244f42f4add5ace3c4cce84a29d4d75e5c708
MD5 c871f3b65c66846a128626ae1f9ed0c7
BLAKE2b-256 4828b3099587ad9bc05b3d4987b9425ac6dcbe1e7a4b5d3299076b9d5a893e2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page