hyperpocket-llamaindex 0.2.1__tar.gz → 0.3.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperpocket-llamaindex
3
- Version: 0.2.1
3
+ Version: 0.3.1
4
4
  Author-email: Hyperpocket Team <hyperpocket@vessl.ai>
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: hyperpocket>=0.0.3
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "hyperpocket-llamaindex"
4
- version = "0.2.1"
4
+ version = "0.3.1"
5
5
  description = ""
6
6
  authors = [{ name = "Hyperpocket Team", email = "hyperpocket@vessl.ai" }]
7
7
  requires-python = ">=3.10"
@@ -1,13 +1,13 @@
1
1
  import ast
2
2
  import json
3
+ import os
3
4
  from unittest.async_case import IsolatedAsyncioTestCase
4
5
 
5
- from hyperpocket.config import config, secret
6
- from hyperpocket.tool import from_git
7
6
  from llama_index.agent.openai import OpenAIAgent
8
7
  from llama_index.llms.openai import OpenAI
9
8
  from pydantic import BaseModel
10
9
 
10
+ from hyperpocket.config import config
11
11
  from hyperpocket_llamaindex import PocketLlamaindex
12
12
 
13
13
 
@@ -21,18 +21,14 @@ class TestPocketLlamaindexNoProfile(IsolatedAsyncioTestCase):
21
21
 
22
22
  self.pocket = PocketLlamaindex(
23
23
  tools=[
24
- from_git(
25
- "https://github.com/vessl-ai/hyperawesometools",
26
- "main",
27
- "managed-tools/none/simple-echo-tool",
28
- ),
24
+ "https://github.com/vessl-ai/hyperpocket/main/tree/tools/none/simple-echo-tool",
29
25
  self.add,
30
26
  self.sub_pydantic_args,
31
27
  ],
32
28
  use_profile=False,
33
29
  )
34
30
 
35
- self.llm = OpenAI(model="gpt-4o", api_key=secret["OPENAI_API_KEY"])
31
+ self.llm = OpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY"))
36
32
 
37
33
  async def asyncTearDown(self):
38
34
  self.pocket._teardown_server()
@@ -41,7 +37,7 @@ class TestPocketLlamaindexNoProfile(IsolatedAsyncioTestCase):
41
37
  # given
42
38
  agent = OpenAIAgent.from_tools(
43
39
  tools=self.pocket.get_tools(),
44
- llm=OpenAI(model="gpt-4o", api_key=secret["OPENAI_API_KEY"]),
40
+ llm=OpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY")),
45
41
  verbose=True,
46
42
  )
47
43
 
@@ -1,13 +1,13 @@
1
1
  import ast
2
2
  import json
3
+ import os
3
4
  from unittest.async_case import IsolatedAsyncioTestCase
4
5
 
5
- from hyperpocket.config import config, secret
6
- from hyperpocket.tool import from_git
7
6
  from llama_index.agent.openai import OpenAIAgent
8
7
  from llama_index.llms.openai import OpenAI
9
8
  from pydantic import BaseModel
10
9
 
10
+ from hyperpocket.config import config
11
11
  from hyperpocket_llamaindex import PocketLlamaindex
12
12
 
13
13
 
@@ -21,18 +21,14 @@ class TestPocketLlamaindexUseProfile(IsolatedAsyncioTestCase):
21
21
 
22
22
  self.pocket = PocketLlamaindex(
23
23
  tools=[
24
- from_git(
25
- "https://github.com/vessl-ai/hyperawesometools",
26
- "main",
27
- "managed-tools/none/simple-echo-tool",
28
- ),
24
+ "https://github.com/vessl-ai/hyperpocket/main/tree/tools/none/simple-echo-tool",
29
25
  self.add,
30
26
  self.sub_pydantic_args,
31
27
  ],
32
28
  use_profile=True,
33
29
  )
34
30
 
35
- self.llm = OpenAI(model="gpt-4o", api_key=secret["OPENAI_API_KEY"])
31
+ self.llm = OpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY"))
36
32
 
37
33
  async def asyncTearDown(self):
38
34
  self.pocket._teardown_server()
@@ -41,7 +37,7 @@ class TestPocketLlamaindexUseProfile(IsolatedAsyncioTestCase):
41
37
  # given
42
38
  agent = OpenAIAgent.from_tools(
43
39
  tools=self.pocket.get_tools(),
44
- llm=OpenAI(model="gpt-4o", api_key=secret["OPENAI_API_KEY"]),
40
+ llm=OpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY")),
45
41
  verbose=True,
46
42
  )
47
43