mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-06 03:05:25 +00:00
fix: mill update
This commit is contained in:
parent
ef1ffa9468
commit
e540657868
@ -1,5 +1,6 @@
|
|||||||
# Standard library imports
|
# Standard library imports
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
@ -74,7 +74,7 @@ def get_embeddings(texts: List[str]) -> List[List[float]]:
|
|||||||
def get_remote_embeddings(texts: List[str]) -> List[List[float]]:
|
def get_remote_embeddings(texts: List[str]) -> List[List[float]]:
|
||||||
payload = {"model": settings.embedding.model, "input": texts}
|
payload = {"model": settings.embedding.model, "input": texts}
|
||||||
|
|
||||||
with httpx.Client() as client:
|
with httpx.Client(timeout=60) as client:
|
||||||
try:
|
try:
|
||||||
response = client.post(settings.embedding.endpoint, json=payload)
|
response = client.post(settings.embedding.endpoint, json=payload)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user