This file contains hidden or 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
| curl http://192.168.1.111:8880/embeddings -X POST -H "Content-Type: application/json" -d '{ | |
| "input": "This is testing message", | |
| "model": "snowflake-arctic-embed-l-v2.0-gguf" | |
| }' | jq "." |
This file contains hidden or 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
| curl -X 'POST' \ | |
| 'http://192.168.1.111:8880/v1/rerank' \ | |
| -H 'accept: application/json' \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "documents": [ | |
| "Carson City is the capital city of the American state of Nevada.", | |
| "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", | |
| "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", | |
| "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", |
This file contains hidden or 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
| services: | |
| surrealdb: | |
| image: 'surrealdb/surrealdb:latest' | |
| container_name: surrealdb | |
| restart: always | |
| environment: | |
| - SURREALDB_USER | |
| - SURREALDB_PASSWORD | |
| - SURREALDB_DATABASE | |
| volumes: |
This file contains hidden or 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
| // REF: https://pro.codewithandrea.com/flutter-in-production/05-analytics/05-app-analytics-architecture | |
| import 'dart:developer'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:mixpanel_flutter/mixpanel_flutter.dart'; | |
| import 'package:firebase_analytics/firebase_analytics.dart'; | |
| class AnalyticsClient { | |
| const AnalyticsClient(this._analytics, this._mixpanel); | |
| final FirebaseAnalytics _analytics; |
This file contains hidden or 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
| name: llmware/slim-sentiment-tool | |
| parameters: | |
| model: llmware/slim-sentiment-tool/slim-sentiment.gguf | |
| temperature: 0.0 | |
| context_size: 2048 | |
| backend: llama | |
| template: | |
| completion: "<human> {{.Input }} <classify> sentiment </classify>\n<bot>:" | |
| trimsuffix: |
This file contains hidden or 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
| # find info of service running in port 8882 | |
| lsof -i:8882 | |
| # kill it | |
| kill $(lsof -t -i:8882) |
This file contains hidden or 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
| #!/bin/bash | |
| # Check if conda environment is activated | |
| if [[ "$CONDA_PREFIX" != "$(pwd)/.conda" ]]; then | |
| echo "Activating conda environment..." | |
| # Initialize conda for this shell if not already | |
| if ! command -v conda &> /dev/null; then | |
| echo "conda not found in PATH. Make sure Conda is installed and initialized." | |
| exit 1 | |
| fi |
This file contains hidden or 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
| # mlc.ai configs in the .bashrc file | |
| export MLC_HOME="/mnt/emmc/ws/mlc.ai" | |
| export TVM_HOME=$MLC_HOME/tvm-unity | |
| export MLC_LLM_HOME=$MLC_HOME/mlc-llm | |
| export PYTHONPATH=$TVM_HOME/python:$MLC_LLM_HOME/python:${PYTHONPATH} | |
| alias mlc_llm="python -m mlc_llm" |
This file contains hidden or 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
| LOCALAI_ADDRESS=":8880" | |
| LOCALAI_BACKEND_ASSETS_PATH="./backend_data" | |
| LOCALAI_CORS="true" | |
| LOCALAI_CORS_ALLOW_ORIGINS="*" |
This file contains hidden or 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
| TRANSCRIPTION_MODEL="fastwhisperapi" | |
| RESPONSE_MODEL="localai" | |
| TTS_MODEL="localai" | |
| OPENAI_API_KEY="OPENAI_API_KEY" | |
| GROQ_API_KEY="GROQ_API_KEY" | |
| DEEPGRAM_API_KEY="DEEPGRAM_API_KEY" | |
| ELEVENLABS_API_KEY="ELEVENLABS_API_KEY" | |
| CARTESIA_API_KEY="CARTESIA_API_KEY" | |
| LOCAL_MODEL_PATH=path/to/local/model | |
| LOCALAI_BASE_URL="http://192.168.1.111:8888/v1" |