Ai
get_completions(messages, stream=False, response_model=None, max_tokens=1000, temperature=0, top_p=1, seed=100, full_response=False, client=None)
Returns a response from the azure openai model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
messages |
list
|
|
required |
stream |
bool
|
|
False
|
response_model |
BaseModel
|
|
None
|
monitor |
|
required | |
max_tokens |
int
|
|
1000
|
temperature |
int
|
|
0
|
top_p |
int
|
|
1
|
seed |
int
|
|
100
|
full_response |
bool
|
|
False
|
client |
|
None
|
Returns:
Name | Type | Description |
---|---|---|
response |
str | BaseModel | None
|
str | BaseModel | None : |
Source code in src/ml/ai.py
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
get_rag_response(user_input)
Return the response after running RAG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_input |
|
required | |
settings |
|
required | |
conversation_id |
|
required |
Returns:
Name | Type | Description |
---|---|---|
response |
|
Source code in src/ml/ai.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
run_azure_ai_search_indexer()
Run the azure ai search index.
Returns:
Name | Type | Description |
---|---|---|
res |
response |
Source code in src/ml/ai.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|