A short description of your project
Project description
pre-commit install add this in instllation guidelines
plan:
- create graph. this will be configurable. using config yaml file graph will be built accordinly.
- define state. if no state is passed while creating graph then it will take the default state. state will be modfiable while building graph.
- add conditional edges. get config from yaml file
- table selector node
- graph builder willl return graph and mermaid diagram (done)
- logger setup (done)
- linter setup (done)
- final state id fix (done)
- 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, ....)
- Implement QueryReframer, IntentEngine, QueryBuilder, class. these class will accept config, metadata, prompt, examples as required.
- Set up default prompt for each modules. If prompt is not passed then it will use default prompt.
- 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, ....)
- prompts, configs, examples will be pass via config directly/ path for prompts will be defined in config yaml.
- compile and run the graph as per given configs.
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mle_nl2query-0.1.2.tar.gz.
File metadata
- Download URL: mle_nl2query-0.1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf45b41e6451754700cd013731a7c9678cc57f6b384b70d2685e8ce6954e09c5
|
|
| MD5 |
f674b5f0d978830595ad020d87a438ff
|
|
| BLAKE2b-256 |
aa99a18293caf9d93120aedf736a3599b723862ae6be9a2952621b106c01b201
|
File details
Details for the file mle_nl2query-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mle_nl2query-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eddc874dc2f44ba8b334a286f7444842b80938f9ddf3f7658473d3f19816c26
|
|
| MD5 |
4733051d3f068f97a021299786da9054
|
|
| BLAKE2b-256 |
667a993ea1d2052535f91595d9ee78e049fd9ec540731d6ea465b5a252836a8c
|