Skip to content

Commit

Permalink
README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
george1459 committed Apr 8, 2024
1 parent 35f6ffc commit 0ffe43d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<a href="https://github.com/stanford-oval/suql/stargazers">
<img src="https://img.shields.io/github/stars/stanford-oval/suql?style=social" alt="Github Stars">
</a>
<a href="https://pypi.org/project/suql/">
<img alt="PyPI version" src="https://img.shields.io/pypi/v/suql.svg"/>
</a>
</h1>
</p>
<p align="center">
Expand Down
12 changes: 7 additions & 5 deletions docs/install_pip.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ start_free_text_fncs_server(host=host, port=port)
You should be good to go! In a separate terminal, run `export OPENAI_API_KEY=[your OpenAI API key here]`, and test with

```python
from suql import suql_execute
>>> from suql import suql_execute
# e.g. suql = "SELECT * FROM restaurants WHERE answer(reviews, 'is this a family-friendly restaurant?') = 'Yes' AND rating = 4;"
suql = "Your favorite SUQL"
>>> suql = "Your favorite SUQL"

# e.g. table_w_ids = {"restaurants": "_id"}
table_w_ids = "mapping between table name -> unique ID column name"
>>> table_w_ids = "mapping between table name -> unique ID column name"

suql_execute(suql, table_w_ids)
>>> suql_execute(suql, table_w_ids)
```

Check out [API documentation](https://stanford-oval.github.io/suql/suql/sql_free_text_support/execute_free_text_sql.html) for details.
Check out [API documentation](https://stanford-oval.github.io/suql/suql/sql_free_text_support/execute_free_text_sql.html) for details.

Note that a SUQL should be executed via the Python entry point, as opposed to the PSQL command line (the PSQL command line does not implement the same behavior for the `answer` and `summary` functions).
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Package metadata
name = "suql"
version = "1.0.0b0"
version = "1.1.0a0"
description = "Structured and Unstructured Query Language (SUQL) Python API"
author = "Shicheng Liu"
author_email = "[email protected]"
Expand Down

0 comments on commit 0ffe43d

Please sign in to comment.