-
Notifications
You must be signed in to change notification settings - Fork 79
/
.env.example
115 lines (88 loc) · 5.66 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Configure the environment variables to be used inside the container here.
# ------------------------------------------------------
# SET Server Port
# ------------------------------------------------------
SERVER_PORT: 8080
# ------------------------------------------------------
# SET Host and Proxy
# HOST_NAME is the local network IP address of your machine, which you can obtain using Ifconfig/Ipconfig.
# PROXY_URL is optional and serves as a proxy for accessing the OpenAI API when direct access is not possible.
# ------------------------------------------------------
HOST_NAME: http://192.168.8.104:8080 # Needs to be modified to your own, required
PROXY_URL: http://192.168.8.104:7890 # Needs to be modified to your own, optional
# ------------------------------------------------------
# SET Postgres.
# Postgres will be used for storing the image database and for vector queries.
# ------------------------------------------------------
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: root
POSTGRES_PASSWORD: 123456
POSTGRES_DATABASE: album
# ------------------------------------------------------
# SET Album Path
# You shouldn’t change the directory of images inside the container unless you’re sure of its purpose.
# ------------------------------------------------------
ALBUM_PATH: /home/images
# ------------------------------------------------------
# SET OpenAI / Anthropic API Key,
# Album-ai can use the models claude-3-haiku-20240307 and gpt-4o-mini as visual and dialogue models.
# ------------------------------------------------------
OPENAI_API_KEY: # Your open ai key, required
ANTHROPIC_API_KEY: # Your anthropic key, optional
# ------------------------------------------------------
# similarity_score is a score that indicates the similarity between the query text and the document;
# the smaller the score, the more similar they are.
# ------------------------------------------------------
SIMILARITY_SCORE: 0.8
# ------------------------------------------------------
# Maximum number of searches
# ------------------------------------------------------
MAX_SEARCH_LIMIT: 10
# ------------------------------------------------------
# SET Image Extract Model
# ------------------------------------------------------
# The available model providers include: anthropic and openai.
IMAGE_EXTRACT_PROVIDER: openai
# The available vision model for anthropic is: claude-3-haiku-20240307
# The available vision model for openai is: gpt-4o-mini
IMAGE_EXTRACT_PROVIDER_MODEL: gpt-4o-mini
# The prompt for image extract can be modified as needed.
IMAGE_EXTRACT_PROVIDER_PROMPT: 'You are an advanced image recognition AI tasked with identifying and describing the contents of images. Your analysis will be used in an image recognition software. Follow these instructions carefully:
1. You will be presented with an image.
2. Analyze the image thoroughly, paying attention to all visible elements, including:
- Objects
- People
- Text
- Colors
- Shapes
- Patterns
- Background
- Foreground
- Emotional and atmosphere
- Any notable features or characteristics
3. If any aspect of the image is unclear or ambiguous, state this explicitly in the relevant section of your analysis. Use phrases like "unclear," "ambiguous," or "cannot be determined with certainty" when appropriate.
4. Remember to respect privacy and ethical considerations:
- Do not attempt to identify specific individuals
- Avoid making assumptions about race, ethnicity, or other sensitive characteristics unless they are clearly relevant to the image content
- If the image contains potentially sensitive or inappropriate content, mention this in the Additional Note section without going into explicit detail
5. Provide your complete analysis(Markdown format) within <metadata> tags.
Remember, your goal is to provide an accurate, detailed, and objective description of the image contents that can be used by image recognition software. Focus on what you can see and reasonably infer from the image itself.'
# ------------------------------------------------------
# SET Embedding Model provider and model name
# ------------------------------------------------------
EMBEDDING_PROVIDER: openai
EMBEDDING_PROVIDER_MODEL: text-embedding-3-large
# ------------------------------------------------------
# SET Chat Model provider and model name
# ------------------------------------------------------
# Available chat model providers include: Anthropic and OpenAI.
CHAT_PROVIDER: openai
# You can choose any model from the provider for conversations.
CHAT_PROVIDER_MODEL: gpt-4o-mini
# The prompt for chat can be modified as needed.
CHAT_PROVIDER_PROMPT: "You are an artificial intelligence image album assistant, and your goal is to respond to user requests by combining relevant image data.
The user request is: <request>{0}</request>,
and the associated images are: <images>{1}</images>.
'fId' is the unique identification of the image.
You need to return a friendly response in Markdown format and showcase the related images(use markdown image tag)."