-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathmodels.py
More file actions
35 lines (29 loc) · 953 Bytes
/
models.py
File metadata and controls
35 lines (29 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Model classes for Azure OpenAI Chat Application.
"""
from dataclasses import dataclass
from typing import List, Optional, Dict
@dataclass
class AzureOpenAIConfiguration:
"""
Represents the configuration for Azure OpenAI service.
"""
api_key: str
endpoint: str
deployment_name: str
api_version: Optional[str] = None
@dataclass
class ChatCompletionConfiguration:
"""
Represents the configuration for an AI model including messages and parameters.
"""
max_tokens: int
temperature: float
top_p: float
model: Optional[str] = None
messages: Optional[List[Dict[str, str]]] = None