Commit 4
Browse files
tools.py
CHANGED
|
@@ -100,13 +100,13 @@ def ocr(base64_image: str) -> str:
|
|
| 100 |
Returns: a string summary or description of what the image contains.
|
| 101 |
"""
|
| 102 |
client = AzureOpenAI(
|
| 103 |
-
azure_endpoint=os.environ.get("
|
| 104 |
-
|
| 105 |
-
|
| 106 |
)
|
| 107 |
|
| 108 |
response = client.chat.completions.create(
|
| 109 |
-
model=os.environ["
|
| 110 |
messages=[
|
| 111 |
{"role": "user", "content": [
|
| 112 |
{"type": "text", "text": "Describe the image"},
|
|
|
|
| 100 |
Returns: a string summary or description of what the image contains.
|
| 101 |
"""
|
| 102 |
client = AzureOpenAI(
|
| 103 |
+
azure_endpoint=os.environ.get("AZendpoint"),
|
| 104 |
+
api_version=os.environ.get("api_version"),
|
| 105 |
+
api_key=os.environ.get("api_key")
|
| 106 |
)
|
| 107 |
|
| 108 |
response = client.chat.completions.create(
|
| 109 |
+
model=os.environ["model"],
|
| 110 |
messages=[
|
| 111 |
{"role": "user", "content": [
|
| 112 |
{"type": "text", "text": "Describe the image"},
|