File tree Expand file tree Collapse file tree 5 files changed +48
-48
lines changed Expand file tree Collapse file tree 5 files changed +48
-48
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ This module contains the Gptcmd class and serves as an entry point to the
3
+ Gptcmd command line application.
4
+ Copyright 2024 Bill Dengler
5
+ This Source Code Form is subject to the terms of the Mozilla Public
6
+ License, v. 2.0. If a copy of the MPL was not distributed with this
7
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
+ """
9
+
10
+
1
11
import argparse
2
12
import cmd
3
13
import dataclasses
29
39
)
30
40
31
41
32
- """
33
- This module contains the Gptcmd class and serves as an entry point to the
34
- Gptcmd command line application.
35
- Copyright 2023 Bill Dengler
36
- This Source Code Form is subject to the terms of the Mozilla Public
37
- License, v. 2.0. If a copy of the MPL was not distributed with this
38
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
39
- """
40
-
41
-
42
42
__version__ = "2.0.0"
43
43
44
44
Original file line number Diff line number Diff line change
1
+ """
2
+ This module contains the ConfigManager class, which controls Gptcmd's
3
+ config system.
4
+ Copyright 2024 Bill Dengler
5
+ This Source Code Form is subject to the terms of the Mozilla Public
6
+ License, v. 2.0. If a copy of the MPL was not distributed with this
7
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
+ """
9
+
10
+
1
11
import dataclasses
2
12
import os
3
13
import sys
21
31
from .llm .openai import AzureAI , OpenAI
22
32
23
33
24
- """
25
- This module contains the ConfigManager class, which controls Gptcmd's
26
- config system.
27
- Copyright 2024 Bill Dengler
28
- This Source Code Form is subject to the terms of the Mozilla Public
29
- License, v. 2.0. If a copy of the MPL was not distributed with this
30
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
31
- """
32
-
33
-
34
34
DEFAULT_PROVIDERS : Dict [str , Type [LLMProvider ]] = {
35
35
"openai" : OpenAI ,
36
36
"azure" : AzureAI ,
Original file line number Diff line number Diff line change
1
+ """
2
+ This module contains the LLMProvider class and supporting infrastructure.
3
+ Copyright 2024 Bill Dengler
4
+ This Source Code Form is subject to the terms of the Mozilla Public
5
+ License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
+ """
8
+
9
+
1
10
import dataclasses
2
11
from abc import ABC , abstractmethod
3
12
from decimal import Decimal
16
25
from ..message import Message , MessageAttachment , UnknownAttachment
17
26
18
27
19
- """
20
- This module contains the LLMProvider class and supporting infrastructure.
21
- Copyright 2024 Bill Dengler
22
- This Source Code Form is subject to the terms of the Mozilla Public
23
- License, v. 2.0. If a copy of the MPL was not distributed with this
24
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
25
- """
26
-
27
-
28
28
@dataclasses .dataclass
29
29
class LLMResponse :
30
30
message : Message
Original file line number Diff line number Diff line change
1
+ """
2
+ This module contains implementations of LLMProvider for OpenAI and Azure.
3
+ Copyright 2024 Bill Dengler
4
+ This Source Code Form is subject to the terms of the Mozilla Public
5
+ License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
+ """
8
+
9
+
1
10
import inspect
2
11
3
12
from decimal import Decimal
15
24
import openai
16
25
17
26
18
- """
19
- This module contains implementations of LLMProvider for OpenAI and Azure.
20
- Copyright 2024 Bill Dengler
21
- This Source Code Form is subject to the terms of the Mozilla Public
22
- License, v. 2.0. If a copy of the MPL was not distributed with this
23
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
24
- """
25
-
26
-
27
27
class OpenAI (LLMProvider ):
28
28
SUPPORTED_FEATURES = (
29
29
LLMProviderFeature .MESSAGE_NAME_FIELD
Original file line number Diff line number Diff line change
1
+ """
2
+ This module contains classes and types for interacting with messages and
3
+ message threads.
4
+ Copyright 2024 Bill Dengler
5
+ This Source Code Form is subject to the terms of the Mozilla Public
6
+ License, v. 2.0. If a copy of the MPL was not distributed with this
7
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
+ """
9
+
10
+
1
11
import base64
2
12
import dataclasses
3
13
import mimetypes
25
35
from strenum import StrEnum
26
36
27
37
28
- """
29
- This module contains classes and types for interacting with messages and
30
- message threads.
31
- Copyright 2023 Bill Dengler
32
- This Source Code Form is subject to the terms of the Mozilla Public
33
- License, v. 2.0. If a copy of the MPL was not distributed with this
34
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
35
- """
36
-
37
-
38
38
T = TypeVar ("T" )
39
39
40
40
You can’t perform that action at this time.
0 commit comments