Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsistence-modifications #54

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions example/create_byu_vectorstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import wikipediaapi

wiki_wiki = wikipediaapi.Wikipedia(
user_agent='Maeser AI Example',
language='en',
extract_format=wikipediaapi.ExtractFormat.WIKI
user_agent="Maeser AI Example",
language="en",
extract_format=wikipediaapi.ExtractFormat.WIKI,
)

p_wiki = wiki_wiki.page("Brigham Young University")
Expand All @@ -41,4 +41,4 @@
from langchain_community.vectorstores import FAISS

db = FAISS.from_documents(documents, OpenAIEmbeddings())
db.save_local("example/vectorstores/byu")
db.save_local("vectorstores/byu")
8 changes: 4 additions & 4 deletions example/create_maeser_vectorstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import wikipediaapi

wiki_wiki = wikipediaapi.Wikipedia(
user_agent='Maeser AI Example',
language='en',
extract_format=wikipediaapi.ExtractFormat.WIKI
user_agent="Maeser AI Example",
language="en",
extract_format=wikipediaapi.ExtractFormat.WIKI,
)

p_wiki = wiki_wiki.page("Karl G. Maeser")
Expand All @@ -41,4 +41,4 @@
from langchain_community.vectorstores import FAISS

db = FAISS.from_documents(documents, OpenAIEmbeddings())
db.save_local("example/vectorstores/maeser")
db.save_local("vectorstores/maeser")
6 changes: 3 additions & 3 deletions sphinx-docs/development/flask_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ This should start up a local server. Opening a web browser to the address it tel

## User Management and Authentication

A common thing to add to an app like this is user authentication, giving your app some control over who is using the app. Here, will will show how to modify `flask_example.py` to use authentication. We will register a `GithubAuthenticator` with a `UserManager`. This means that our application will use Github OAuth to authenticate users in the application. This will require you to register a GithHub OAuth Application.
A common thing to add to an app like this is user authentication, giving your app some control over who is using the app. Here, we will show how to modify `flask_example.py` to use authentication. We will register a `GithubAuthenticator` with a `UserManager`. This means that our application will use Github OAuth to authenticate users in the application. This will require you to register a GithHub OAuth Application.

### Code Changes to `flask_example.md`
### Code Changes to `flask_example.py`

First, you need to add the following lines of code to `flask_example.md`:
First, you need to add the following lines of code to `flask_example.py` (alternatively, these changes have already been made in `flask_example_user_management.py`):

```python
from maeser.user_manager import UserManager, GithubAuthenticator
Expand Down
4 changes: 2 additions & 2 deletions sphinx-docs/development/user_setup.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Setting Set Up To Use Maeser
# Setting Up Maeser

There are two possible use models for you as a user. The first is if you simply want to develop your own app that uses Maeser. That is the focus of this document. If, instead, you want to clone and start making changes to the Maeser code base itself, you should instead consult [this documentation](development_setup.md).

Expand Down Expand Up @@ -45,7 +45,7 @@ That is it - Maeser is now installed in your environment.

The Maeser github repo contains an example directory with a collection of sample uses of Maeser. You will likely want use those examples as your starting point. You can either go to github and copy that directory down or you can simply clone the github repo onto your machine.

To clone the repo, you would do the following shell command:
To clone the repo, execute the following shell command:

```shell
git clone https://github.com/byu-cpe/Maeser
Expand Down
Loading