exa-py 1.0.11__tar.gz → 1.0.13__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.

Potentially problematic release.


This version of exa-py might be problematic. Click here for more details.

@@ -1,10 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exa_py
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Python SDK for Exa API.
5
5
  Home-page: https://github.com/exa-labs/exa-py
6
6
  Author: Exa
7
7
  Author-email: hello@exa.ai
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
8
10
  Classifier: Development Status :: 5 - Production/Stable
9
11
  Classifier: Intended Audience :: Developers
10
12
  Classifier: License :: OSI Approved :: MIT License
@@ -16,7 +18,6 @@ Classifier: Programming Language :: Python :: 3.10
16
18
  Classifier: Programming Language :: Python :: 3.11
17
19
  Classifier: Programming Language :: Python :: 3.12
18
20
  Description-Content-Type: text/markdown
19
- Provides-Extra: openai
20
21
 
21
22
  # Exa
22
23
 
@@ -91,3 +92,5 @@ exa = Exa(api_key="your-api-key")
91
92
  highlights={"highlights_per_url": 2, "num_sentences": 1, "query": "This is the highlight query:"})
92
93
  ```
93
94
 
95
+
96
+
@@ -19,18 +19,9 @@ from typing import (
19
19
  from typing_extensions import TypedDict
20
20
 
21
21
  import httpx
22
- from openai import NOT_GIVEN, NotGiven, OpenAI
23
- from openai.types.chat.chat_completion_stream_options_param import (
24
- ChatCompletionStreamOptionsParam,
25
- )
22
+ from openai import OpenAI
26
23
  from openai.types.chat.chat_completion_message_param import ChatCompletionMessageParam
27
24
  from openai.types.chat_model import ChatModel
28
- from openai.types.chat.chat_completion_tool_choice_option_param import (
29
- ChatCompletionToolChoiceOptionParam,
30
- )
31
- from openai.types.chat.chat_completion_tool_param import ChatCompletionToolParam
32
- from openai._types import Headers, Query, Body
33
- from openai.types.chat import completion_create_params
34
25
  from exa_py.utils import (
35
26
  ExaOpenAICompletion,
36
27
  add_message_to_messages,
@@ -344,7 +335,7 @@ class Exa:
344
335
  self,
345
336
  api_key: Optional[str],
346
337
  base_url: str = "https://api.exa.ai",
347
- user_agent: str = "exa-py 1.0.11",
338
+ user_agent: str = "exa-py 1.0.12",
348
339
  ):
349
340
  """Initialize the Exa client with the provided API key and optional base URL and user agent.
350
341
 
@@ -692,38 +683,6 @@ class Exa:
692
683
  # Mandatory OpenAI args
693
684
  messages: Iterable[ChatCompletionMessageParam],
694
685
  model: Union[str, ChatModel],
695
- # Optional OpenAI args
696
- frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
697
- function_call: completion_create_params.FunctionCall | NotGiven = NOT_GIVEN,
698
- functions: (
699
- Iterable[completion_create_params.Function] | NotGiven
700
- ) = NOT_GIVEN,
701
- logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
702
- logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
703
- max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
704
- n: Optional[int] | NotGiven = NOT_GIVEN,
705
- presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
706
- response_format: (
707
- completion_create_params.ResponseFormat | NotGiven
708
- ) = NOT_GIVEN,
709
- seed: Optional[int] | NotGiven = NOT_GIVEN,
710
- stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN,
711
- stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
712
- stream_options: (
713
- Optional[ChatCompletionStreamOptionsParam] | NotGiven
714
- ) = NOT_GIVEN,
715
- temperature: Optional[float] | NotGiven = NOT_GIVEN,
716
- tool_choice: ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN,
717
- tools: Iterable[ChatCompletionToolParam] | NotGiven = NOT_GIVEN,
718
- top_logprobs: Optional[int] | NotGiven = NOT_GIVEN,
719
- top_p: Optional[float] | NotGiven = NOT_GIVEN,
720
- user: str | NotGiven = NOT_GIVEN,
721
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
722
- # The extra values given here take precedence over values defined on the client or passed to this method.
723
- extra_headers: Headers | None = None,
724
- extra_query: Query | None = None,
725
- extra_body: Body | None = None,
726
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
727
686
  # Exa args
728
687
  use_exa: Optional[Literal["required", "none", "auto"]] = "auto",
729
688
  highlights: Union[HighlightsContentsOptions, Literal[True], None] = None,
@@ -738,6 +697,8 @@ class Exa:
738
697
  type: Optional[str] = None,
739
698
  category: Optional[str] = None,
740
699
  result_max_len: int = 2048,
700
+ # OpenAI args
701
+ **openai_kwargs,
741
702
  ):
742
703
  exa_kwargs = {
743
704
  "num_results": num_results,
@@ -755,33 +716,11 @@ class Exa:
755
716
 
756
717
  create_kwargs = {
757
718
  "model": model,
758
- "frequency_penalty": frequency_penalty,
759
- "function_call": function_call,
760
- "functions": functions,
761
- "logit_bias": logit_bias,
762
- "logprobs": logprobs,
763
- "max_tokens": max_tokens,
764
- "n": n,
765
- "presence_penalty": presence_penalty,
766
- "response_format": response_format,
767
- "seed": seed,
768
- "stop": stop,
769
- "stream": stream,
770
- "stream_options": stream_options,
771
- "temperature": temperature,
772
- "tool_choice": tool_choice,
773
- "tools": tools,
774
- "top_logprobs": top_logprobs,
775
- "top_p": top_p,
776
- "user": user,
777
- "extra_headers": extra_headers,
778
- "extra_query": extra_query,
779
- "extra_body": extra_body,
780
- "timeout": timeout,
719
+ **openai_kwargs,
781
720
  }
782
721
 
783
722
  if use_exa != "none":
784
- assert tools is NOT_GIVEN, "Tool use is not supported with Exa"
723
+ assert "tools" not in create_kwargs, "Tool use is not supported with Exa"
785
724
  create_kwargs["tool_choice"] = use_exa
786
725
 
787
726
  return self._create_with_tool(
@@ -1,10 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exa-py
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Python SDK for Exa API.
5
5
  Home-page: https://github.com/exa-labs/exa-py
6
6
  Author: Exa
7
7
  Author-email: hello@exa.ai
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
8
10
  Classifier: Development Status :: 5 - Production/Stable
9
11
  Classifier: Intended Audience :: Developers
10
12
  Classifier: License :: OSI Approved :: MIT License
@@ -16,7 +18,6 @@ Classifier: Programming Language :: Python :: 3.10
16
18
  Classifier: Programming Language :: Python :: 3.11
17
19
  Classifier: Programming Language :: Python :: 3.12
18
20
  Description-Content-Type: text/markdown
19
- Provides-Extra: openai
20
21
 
21
22
  # Exa
22
23
 
@@ -91,3 +92,5 @@ exa = Exa(api_key="your-api-key")
91
92
  highlights={"highlights_per_url": 2, "num_sentences": 1, "query": "This is the highlight query:"})
92
93
  ```
93
94
 
95
+
96
+
@@ -1,6 +1,3 @@
1
1
  requests
2
2
  typing-extensions
3
- openai
4
-
5
- [openai]
6
- openai
3
+ openai>=1.10.0
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="exa_py",
5
- version="1.0.11",
5
+ version="1.0.13",
6
6
  description="Python SDK for Exa API.",
7
7
  long_description_content_type="text/markdown",
8
8
  long_description=open("README.md").read(),
@@ -14,11 +14,8 @@ setup(
14
14
  install_requires=[
15
15
  "requests",
16
16
  "typing-extensions",
17
- "openai"
17
+ "openai>=1.10.0"
18
18
  ],
19
- extras_require={
20
- "openai": ["openai"]
21
- },
22
19
  classifiers=[
23
20
  "Development Status :: 5 - Production/Stable",
24
21
  "Intended Audience :: Developers",
File without changes
File without changes
File without changes
File without changes
File without changes