Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,11 +89,12 @@ def list_files_indb(directory=foldername):
|
|
89 |
|
90 |
search_mode = 0#Always Search
|
91 |
|
|
|
92 |
|
93 |
# OpenAI client setup
|
94 |
client = OpenAI(
|
95 |
-
base_url='https://
|
96 |
-
api_key=
|
97 |
)
|
98 |
|
99 |
# Function list for OpenAI API
|
@@ -168,7 +169,7 @@ def openai_api_call(messages, retries=3, delay=5, online=False):
|
|
168 |
messages[-1]['content'] = "[System: SEARCH when the user ASKED A QUESTION & remember to CITE(the source is the first tag). Otherwise do not search];" + messages[-1]['content']
|
169 |
|
170 |
completion = client.chat.completions.create(
|
171 |
-
model="
|
172 |
messages=messages,
|
173 |
functions=function_list,
|
174 |
function_call='auto',
|
|
|
89 |
|
90 |
search_mode = 0#Always Search
|
91 |
|
92 |
+
Route1 = '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'
|
93 |
|
94 |
# OpenAI client setup
|
95 |
client = OpenAI(
|
96 |
+
base_url='https://openrouter.ai/api/v1',
|
97 |
+
api_key=Route1,
|
98 |
)
|
99 |
|
100 |
# Function list for OpenAI API
|
|
|
169 |
messages[-1]['content'] = "[System: SEARCH when the user ASKED A QUESTION & remember to CITE(the source is the first tag). Otherwise do not search];" + messages[-1]['content']
|
170 |
|
171 |
completion = client.chat.completions.create(
|
172 |
+
model="meta-llama/llama-3.2-11b-vision-instruct:free",
|
173 |
messages=messages,
|
174 |
functions=function_list,
|
175 |
function_call='auto',
|