euriai 1.0.20__py3-none-any.whl → 1.0.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- euriai/__init__.py +1 -1
- euriai/llamaindex.py +20 -5
- {euriai-1.0.20.dist-info → euriai-1.0.21.dist-info}/METADATA +1 -1
- {euriai-1.0.20.dist-info → euriai-1.0.21.dist-info}/RECORD +7 -7
- {euriai-1.0.20.dist-info → euriai-1.0.21.dist-info}/WHEEL +0 -0
- {euriai-1.0.20.dist-info → euriai-1.0.21.dist-info}/entry_points.txt +0 -0
- {euriai-1.0.20.dist-info → euriai-1.0.21.dist-info}/top_level.txt +0 -0
euriai/__init__.py
CHANGED
euriai/llamaindex.py
CHANGED
@@ -247,12 +247,9 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
247
247
|
|
248
248
|
def complete(self, prompt: str, formatted: bool = False, **kwargs) -> CompletionResponse:
|
249
249
|
"""Complete a prompt."""
|
250
|
-
# Convert prompt to message format
|
251
|
-
messages = [{"role": "user", "content": prompt}]
|
252
|
-
|
253
250
|
# Prepare request
|
254
251
|
params = self._prepare_request_params(**kwargs)
|
255
|
-
params["
|
252
|
+
params["prompt"] = prompt # Use 'prompt' directly instead of converting to messages
|
256
253
|
|
257
254
|
try:
|
258
255
|
# Make API call
|
@@ -267,9 +264,27 @@ class EuriaiLlamaIndexLLM(LLM):
|
|
267
264
|
# Format messages
|
268
265
|
formatted_messages = self._format_messages(messages)
|
269
266
|
|
267
|
+
# Convert messages to a single prompt string
|
268
|
+
prompt_parts = []
|
269
|
+
system_message = None
|
270
|
+
|
271
|
+
for msg in formatted_messages:
|
272
|
+
if msg["role"] == "system":
|
273
|
+
system_message = msg["content"]
|
274
|
+
elif msg["role"] == "user":
|
275
|
+
prompt_parts.append(f"User: {msg['content']}")
|
276
|
+
elif msg["role"] == "assistant":
|
277
|
+
prompt_parts.append(f"Assistant: {msg['content']}")
|
278
|
+
|
279
|
+
# Combine system message and conversation
|
280
|
+
if system_message:
|
281
|
+
prompt = f"System: {system_message}\n\n" + "\n".join(prompt_parts)
|
282
|
+
else:
|
283
|
+
prompt = "\n".join(prompt_parts)
|
284
|
+
|
270
285
|
# Prepare request
|
271
286
|
params = self._prepare_request_params(**kwargs)
|
272
|
-
params["
|
287
|
+
params["prompt"] = prompt # Use 'prompt' instead of 'messages'
|
273
288
|
|
274
289
|
try:
|
275
290
|
# Make API call
|
@@ -1,4 +1,4 @@
|
|
1
|
-
euriai/__init__.py,sha256=
|
1
|
+
euriai/__init__.py,sha256=rZKjGWQNLRH9vemEMK7imoymMy7PiFbC77k2aVFvc7A,6427
|
2
2
|
euriai/autogen.py,sha256=z1WHftUgu3_Sn8zDXmf31onikS0p8TwH5JE4llL7ogk,21144
|
3
3
|
euriai/cli.py,sha256=hF1wiiL2QQSfWf8WlLQyNVDBd4YkbiwmMSoPxVbyPTM,3290
|
4
4
|
euriai/client.py,sha256=L-o6hv9N3md-l-hz-kz5nYVaaZqnrREZlo_0jguhF7E,4066
|
@@ -9,11 +9,11 @@ euriai/euri_chat.py,sha256=DEAiet1ReRwB4ljkPYaTl1Nb5uc20-JF-3PQjGQZXk4,3567
|
|
9
9
|
euriai/euri_embed.py,sha256=g7zs1G-ZBDJjOGJtkkfIcV4LPtRcm9wpVWmrfMGn5EM,2919
|
10
10
|
euriai/langchain.py,sha256=gVF9eh21RC1WtDn7SQoEREUDqOObm5IRx6BFZtB5xcc,34968
|
11
11
|
euriai/langgraph.py,sha256=_D89ugUcVQevjZ1GK-IkJQdbi7JFxJGtqFJ0CyO89bk,44623
|
12
|
-
euriai/llamaindex.py,sha256=
|
12
|
+
euriai/llamaindex.py,sha256=t7kZk_04SDN7gQic5FAAdzRSgpCAkk4PdKonGqo8X-s,27980
|
13
13
|
euriai/n8n.py,sha256=hjkckqyW_hZNL78UkBCof1WvKCKCIjwdvZdAgx6NrB8,3764
|
14
14
|
euriai/smolagents.py,sha256=xlixGx2IWzAPTpSJGsYIK2L-SHGY9Mw1-8GbwVsEYtU,28507
|
15
|
-
euriai-1.0.
|
16
|
-
euriai-1.0.
|
17
|
-
euriai-1.0.
|
18
|
-
euriai-1.0.
|
19
|
-
euriai-1.0.
|
15
|
+
euriai-1.0.21.dist-info/METADATA,sha256=QRiYJzlZcmqVPUGZ9O_8KJstZdr0lKQOpRuGCMkwk-4,6807
|
16
|
+
euriai-1.0.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
17
|
+
euriai-1.0.21.dist-info/entry_points.txt,sha256=9OkET8KIGcsjQn8UlnpPKRT75s2KW34jq1__1SXtpMA,43
|
18
|
+
euriai-1.0.21.dist-info/top_level.txt,sha256=TG1htJ8cuD62MXn-NJ7DVF21QHY16w6M_QgfF_Er_EQ,7
|
19
|
+
euriai-1.0.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|