-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from DigitalProductInnovationAndDevelopment/fe…
…at/add-faqs add faqs
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ | |
# CVE Search plugin data | ||
|
||
.cve_search_data/ | ||
|
||
.docs | ||
.idea | ||
.DS_Store | ||
|
||
.env.docker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Frequently Asked Questions | ||
|
||
A compiled list of FAQs that may come in handy. | ||
|
||
## Import ot found? | ||
|
||
If you are getting an "import not found" error, it is likely because the base folder is always `src`. Always run the program from the `src` folder or use the commands inside the Makefile. | ||
|
||
If you have something in `src/lib` and want to use it, import it as follows: | ||
|
||
```python | ||
import lib # or | ||
from lib import ... | ||
``` | ||
|
||
# Why are env.docker and .env different? | ||
|
||
If you are only running the program using Docker, then you only need to worry about `.env.docker`. | ||
|
||
As the addresses tend to be different in a Docker environment compared to a local environment, you need different values to resolve the addresses. | ||
|
||
For example, if you have your program outside Docker (locally) and want to access a database, you may use: | ||
|
||
``` | ||
POSTGRES_SERVER=localhost | ||
``` | ||
|
||
If you run your program inside Docker, then you must use: | ||
|
||
``` | ||
POSTGRES_SERVER=db | ||
``` | ||
|
||
# How can i add my own LLM Strategy? | ||
|
||
There is a `BaseLLMService` that you can extend to create your own strategy. You can then use it as follows: | ||
|
||
```python | ||
class CustomService(BaseLLMService, LLMServiceMixin): | ||
#your methods | ||
|
||
my_strategy = CustomService() # instead of my_strategy = OLLAMAService() | ||
llm_service = LLMServiceStrategy(my_strategy) | ||
|
||
``` | ||
|
||
# What if my input data changes ? | ||
|
||
We have a predefined structure that input must adhere to called `Content`. You can always adjust this to satisfy your input and convert it to a database model. | ||
|
||
Inside the db model called `Findings`, there is a method `from_data` which can be modified to adapt the changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
OLLAMA_URL=http://localhost:11434 | ||
OLLAMA_MODEL=phi3:mini | ||
# Postgres | ||
POSTGRES_SERVER=localhost | ||
POSTGRES_PORT=5432 | ||
POSTGRES_DB=app | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=postgres | ||
|
||
|
||
AI_STRATEGY=OLLAMA #OLLAMA,OPENAI,ANTHROPIC | ||
|
||
; ANTHROPIC_API_KEY= | ||
; OPENAI_API_KEY= | ||
|
||
QUEUE_PROCESSING_LIMIT=10 | ||
|
||
REDIS_ENDPOINT= redis://localhost:6379/0 | ||
|
||
DB_DEBUG=false #Prints all SQL queries. 'true' or 'false' | ||
|
||
|
||
ENVIRONMENT=development |