Spaces:
Sleeping
Sleeping
QAway-to
commited on
Commit
·
140a6f1
1
Parent(s):
2da3c27
model change
Browse files- analyzer.py +2 -2
analyzer.py
CHANGED
|
@@ -7,12 +7,12 @@ from openai import OpenAI
|
|
| 7 |
def analyze_portfolio_streaming(text: str, client:OpenAI):
|
| 8 |
portfolio_id = extract_portfolio_id(text)
|
| 9 |
if not portfolio_id:
|
| 10 |
-
yield "❗ Укажите корректный portfolioId или
|
| 11 |
return
|
| 12 |
|
| 13 |
try:
|
| 14 |
# Получение JSON по API
|
| 15 |
-
url = f"https://tradelink.pro/portfolio/{portfolio_id}
|
| 16 |
response = requests.get(url)
|
| 17 |
json_data = response.json()
|
| 18 |
extended = json_data.get("data", {}).get("extended", {})
|
|
|
|
| 7 |
def analyze_portfolio_streaming(text: str, client:OpenAI):
|
| 8 |
portfolio_id = extract_portfolio_id(text)
|
| 9 |
if not portfolio_id:
|
| 10 |
+
yield "❗ Укажите корректный portfolioId или ссылку."
|
| 11 |
return
|
| 12 |
|
| 13 |
try:
|
| 14 |
# Получение JSON по API
|
| 15 |
+
url = f"https://api.tradelink.pro/portfolio/get?portfolioId={portfolio_id}&extended=1"
|
| 16 |
response = requests.get(url)
|
| 17 |
json_data = response.json()
|
| 18 |
extended = json_data.get("data", {}).get("extended", {})
|