Skip to content

Commit

Permalink
readme and husky
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmoffet committed Oct 29, 2024
1 parent a6b6ff0 commit de8ac2b
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 105 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gitleaks detect --source . -v
npm install
npm run format
npm run i18n:parse
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@
nvm use 20.15.1
```

5. **Install deps, build and run**:
5. **Run redis**:

- Check for redis on the default `lsof -i:6379`, if it's there, make sure it's got the default creds, or kill it and run:

```bash
docker run -d --name redis -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
```

6. **Install deps, build and run**:

- Install, build and run with hot reloading:

Expand All @@ -54,7 +62,7 @@

- You should see the pipelines server running at 9099, the static files should be compiled and the webui server should be running at http://0.0.0.0:8080.

6. **Set up pipelines to access models via API**:
7. **Set up pipelines to access models via API**:

- The first user to sign up to a new installation should get the admin role. Once you're in, navigate to the Admin Panel > Settings > Connections > OpenAI API section. Set the API URL to http://localhost:9099 and the API key to 0p3n-w3bu! and hit refresh to see if it connects.
- After completing these steps, the model specified in the pipeline should be available in the drop down at the upper left when you create a new conversation.
177 changes: 74 additions & 103 deletions backend/data/config.json
Original file line number Diff line number Diff line change
@@ -1,104 +1,75 @@
{
"version": 0,
"ui": {
"default_locale": "en-US",
"prompt_suggestions": [
{
"title": [
"Help me study",
"vocabulary for a college entrance exam"
],
"content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
},
{
"title": [
"Give me ideas",
"for what to do with my kids' art"
],
"content": "What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter."
},
{
"title": [
"Tell me a fun fact",
"about the Roman Empire"
],
"content": "Tell me a random fun fact about the Roman Empire"
},
{
"title": [
"Show me a code snippet",
"of a website's sticky header"
],
"content": "Show me a code snippet of a website's sticky header in CSS and JavaScript."
},
{
"title": [
"Explain options trading",
"if I'm familiar with buying and selling stocks"
],
"content": "Explain options trading in simple terms if I'm familiar with buying and selling stocks."
},
{
"title": [
"Overcome procrastination",
"give me tips"
],
"content": "Could you start by asking me about instances when I procrastinate the most and then give me some suggestions to overcome it?"
},
{
"title": [
"Grammar check",
"rewrite it for better readability "
],
"content": "Check the following sentence for grammar and clarity: \"[sentence]\". Rewrite it for better readability while maintaining its original meaning."
}
],
"default_models": "azure_openai_GPT4Omni_pipeline",
"user_permissions": {
"chat": {
"deletion": true
}
},
"enable_signup": true,
"default_user_role": "pending",
"enable_community_sharing": true
},
"ollama": {
"base_urls": [
"http://localhost:11434"
]
},
"openai": {
"api_base_urls": [
"http://localhost:9099"
],
"api_keys": [
"0p3n-w3bu!"
]
},
"model_filter": {
"enable": false,
"list": [
""
]
},
"webhook_url": "",
"auth": {
"admin": {
"show": true
},
"jwt_expiry": "-1"
},
"rag": {
"embedding_engine": "openai",
"embedding_model": "text-embedding-3-small",
"embedding_openai_batch_size": 10,
"pdf_extract_images": false,
"chunk_size": 1500,
"chunk_overlap": 100,
"template": "Use the following context as your learned knowledge, inside <context></context> XML tags.\n<context>\n [context]\n</context>\n\nWhen answer to user:\n- If you don't know, just say that you don't know.\n- If you don't know when you are not sure, ask for clarification.\nAvoid mentioning that you obtained the information from the context.\nAnd answer according to the language of the user's question.\n\nGiven the context information, answer the query.\nQuery: [query]",
"top_k": 5,
"relevance_threshold": 0.0,
"enable_hybrid_search": false
}
}
"version": 0,
"ui": {
"default_locale": "en-US",
"prompt_suggestions": [
{
"title": ["Help me study", "vocabulary for a college entrance exam"],
"content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
},
{
"title": ["Give me ideas", "for what to do with my kids' art"],
"content": "What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter."
},
{
"title": ["Tell me a fun fact", "about the Roman Empire"],
"content": "Tell me a random fun fact about the Roman Empire"
},
{
"title": ["Show me a code snippet", "of a website's sticky header"],
"content": "Show me a code snippet of a website's sticky header in CSS and JavaScript."
},
{
"title": ["Explain options trading", "if I'm familiar with buying and selling stocks"],
"content": "Explain options trading in simple terms if I'm familiar with buying and selling stocks."
},
{
"title": ["Overcome procrastination", "give me tips"],
"content": "Could you start by asking me about instances when I procrastinate the most and then give me some suggestions to overcome it?"
},
{
"title": ["Grammar check", "rewrite it for better readability "],
"content": "Check the following sentence for grammar and clarity: \"[sentence]\". Rewrite it for better readability while maintaining its original meaning."
}
],
"default_models": "azure_openai_GPT4Omni_pipeline",
"user_permissions": {
"chat": {
"deletion": true
}
},
"enable_signup": true,
"default_user_role": "pending",
"enable_community_sharing": true
},
"ollama": {
"base_urls": ["http://localhost:11434"]
},
"openai": {
"api_base_urls": ["http://localhost:9099"],
"api_keys": ["0p3n-w3bu!"]
},
"model_filter": {
"enable": false,
"list": [""]
},
"webhook_url": "",
"auth": {
"admin": {
"show": true
},
"jwt_expiry": "-1"
},
"rag": {
"embedding_engine": "openai",
"embedding_model": "text-embedding-3-small",
"embedding_openai_batch_size": 10,
"pdf_extract_images": false,
"chunk_size": 1500,
"chunk_overlap": 100,
"template": "Use the following context as your learned knowledge, inside <context></context> XML tags.\n<context>\n [context]\n</context>\n\nWhen answer to user:\n- If you don't know, just say that you don't know.\n- If you don't know when you are not sure, ask for clarification.\nAvoid mentioning that you obtained the information from the context.\nAnd answer according to the language of the user's question.\n\nGiven the context information, answer the query.\nQuery: [query]",
"top_k": 5,
"relevance_threshold": 0.0,
"enable_hybrid_search": false
}
}

0 comments on commit de8ac2b

Please sign in to comment.