Skip to content

Commit b808c10

Browse files
authored
Add support for new embeddings models and instructions for use with Custom GPTs / function calling (#411)
* Update to support new embeddings models, custom GPTs, and function calling * Update README.md * Update README.md * Update README.md
1 parent b02139d commit b808c10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4070
-2541
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ scripts/
55
tests/
66
examples/
77
local_server/
8+
assets/
89
*.md
910
*.pyc
1011
.dockerignore

.env.example

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Core environment variables
2+
DATASTORE="<your_datastore>"
3+
BEARER_TOKEN="<your_bearer_token>"
4+
OPENAI_API_KEY="<your_openai_api_key>"
5+
EMBEDDING_DIMENSION=256 # edit this value based on the dimension of the embeddings you want to use
6+
EMBEDDING_MODEL="text-embedding-3-large" # edit this value based on the model you want to use e.g. text-embedding-3-small, text-embedding-ada-002
7+
8+
# Optional environment variables for Azure OpenAI
9+
OPENAI_API_BASE="https://<AzureOpenAIName>.openai.azure.com/"
10+
OPENAI_API_TYPE="azure"
11+
OPENAI_EMBEDDINGMODEL_DEPLOYMENTID="<Name of embedding model deployment>"
12+
OPENAI_METADATA_EXTRACTIONMODEL_DEPLOYMENTID="<Name of deployment of model for metatdata>"
13+
OPENAI_COMPLETIONMODEL_DEPLOYMENTID="<Name of general model deployment used for completion>"
14+
OPENAI_EMBEDDING_BATCH_SIZE="<Batch size of embedding, for AzureOAI, this value need to be set as 1>"
15+
16+
# Pinecone configuration
17+
PINECONE_API_KEY="<your_pinecone_api_key>"
18+
PINECONE_ENVIRONMENT="<your_pinecone_environment>"
19+
PINECONE_INDEX="<your_pinecone_index>"
20+
21+
# Weaviate configuration
22+
WEAVIATE_URL="<your_weaviate_instance_url>"
23+
WEAVIATE_API_KEY="<your_api_key_for_WCS>"
24+
WEAVIATE_CLASS="<your_optional_weaviate_class>"
25+
26+
# Zilliz configuration
27+
ZILLIZ_COLLECTION="<your_zilliz_collection>"
28+
ZILLIZ_URI="<your_zilliz_uri>"
29+
ZILLIZ_USER="<your_zilliz_username>"
30+
ZILLIZ_PASSWORD="<your_zilliz_password>"
31+
32+
# Milvus configuration
33+
MILVUS_COLLECTION="<your_milvus_collection>"
34+
MILVUS_HOST="<your_milvus_host>"
35+
MILVUS_PORT="<your_milvus_port>"
36+
MILVUS_USER="<your_milvus_username>"
37+
MILVUS_PASSWORD="<your_milvus_password>"
38+
39+
# Qdrant configuration
40+
QDRANT_URL="<your_qdrant_url>"
41+
QDRANT_PORT="<your_qdrant_port>"
42+
QDRANT_GRPC_PORT="<your_qdrant_grpc_port>"
43+
QDRANT_API_KEY="<your_qdrant_api_key>"
44+
QDRANT_COLLECTION="<your_qdrant_collection>"
45+
46+
# AnalyticDB configuration
47+
PG_HOST="<your_analyticdb_host>"
48+
PG_PORT="<your_analyticdb_port>"
49+
PG_USER="<your_analyticdb_username>"
50+
PG_PASSWORD="<your_analyticdb_password>"
51+
PG_DATABASE="<your_analyticdb_database>"
52+
PG_COLLECTION="<your_analyticdb_collection>"
53+
54+
# Redis configuration
55+
REDIS_HOST="<your_redis_host>"
56+
REDIS_PORT="<your_redis_port>"
57+
REDIS_PASSWORD="<your_redis_password>"
58+
REDIS_INDEX_NAME="<your_redis_index_name>"
59+
REDIS_DOC_PREFIX="<your_redis_doc_prefix>"
60+
REDIS_DISTANCE_METRIC="<your_redis_distance_metric>"
61+
REDIS_INDEX_TYPE="<your_redis_index_type>"
62+
63+
# Llama configuration
64+
LLAMA_INDEX_TYPE="<gpt_vector_index_type>"
65+
LLAMA_INDEX_JSON_PATH="<path_to_saved_index_json_file>"
66+
LLAMA_QUERY_KWARGS_JSON_PATH="<path_to_saved_query_kwargs_json_file>"
67+
LLAMA_RESPONSE_MODE="<response_mode_for_query>"
68+
69+
# Chroma configuration
70+
CHROMA_COLLECTION="<your_chroma_collection>"
71+
CHROMA_IN_MEMORY="<true_or_false>"
72+
CHROMA_PERSISTENCE_DIR="<your_chroma_persistence_directory>"
73+
CHROMA_HOST="<your_chroma_host>"
74+
CHROMA_PORT="<your_chroma_port>"
75+
76+
# Azure Cognitive Search configuration
77+
AZURESEARCH_SERVICE="<your_search_service_name>"
78+
AZURESEARCH_INDEX="<your_search_index_name>"
79+
AZURESEARCH_API_KEY="<your_api_key>" # (optional, uses key-free managed identity if not set)
80+
81+
# Azure CosmosDB Mongo vCore configuration
82+
AZCOSMOS_API="<your azure cosmos db api, for now it only supports mongo>"
83+
AZCOSMOS_CONNSTR="<your azure cosmos db mongo vcore connection string>"
84+
AZCOSMOS_DATABASE_NAME="<your mongo database name>"
85+
AZCOSMOS_CONTAINER_NAME="<your mongo container name>"
86+
87+
# Supabase configuration
88+
SUPABASE_URL="<supabase_project_url>"
89+
SUPABASE_ANON_KEY="<supabase_project_api_anon_key>"
90+
91+
# Postgres configuration
92+
PG_HOST="<postgres_host>"
93+
PG_PORT="<postgres_port>"
94+
PG_USER="<postgres_user>"
95+
PG_PASSWORD="<postgres_password>"
96+
PG_DB="<postgres_database>"
97+
98+
# Elasticsearch configuration
99+
ELASTICSEARCH_URL="<elasticsearch_host_and_port>" # (either specify host or cloud_id)
100+
ELASTICSEARCH_CLOUD_ID="<elasticsearch_cloud_id>"
101+
ELASTICSEARCH_USERNAME="<elasticsearch_username>"
102+
ELASTICSEARCH_PASSWORD="<elasticsearch_password>"
103+
ELASTICSEARCH_API_KEY="<elasticsearch_api_key>"
104+
ELASTICSEARCH_INDEX="<elasticsearch_index_name>"
105+
ELASTICSEARCH_REPLICAS="<elasticsearch_replicas>"
106+
ELASTICSEARCH_SHARDS="<elasticsearch_shards>"

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ env.bak/
116116
venv.bak/
117117
myvenv/
118118

119+
# Exception for .env.example
120+
!.env.example
121+
119122
# Spyder project settings
120123
.spyderproject
121124
.spyproject

.well-known/openapi.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ info:
33
title: Retrieval Plugin API
44
description: A retrieval API for querying and filtering documents based on natural language queries and metadata
55
version: 1.0.0
6-
servers:
7-
- url: https://your-app-url.com
6+
servers:
7+
- url: https://your-app-url.com
88
paths:
99
/query:
1010
post:

0 commit comments

Comments
 (0)