소스 검색

调整

d1
H Vs 3 주 전
부모
커밋
a96155f7c4
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      app/endpoints/pipeline_endpoint.py

+ 5
- 1
app/endpoints/pipeline_endpoint.py 파일 보기

@@ -164,7 +164,11 @@ async def gpt_client_async(request, messages: list, wixd: str, friend_wxid: str)
try:
c = await request.app.state.gewe_service.get_wxchat_config_from_cache_async(wixd)
api_key = c.get('agentTokenId', "sk-jr69ONIehfGKe9JFphuNk4DU5Y5wooHKHhQv7oSnFzVbwCnW65fXO9kvH")
api_url = "http://106.15.182.218:3000/api/v1/chat/completions"
base_url="http://106.15.182.218:3000"
environment = os.environ.get('environment', 'default')
if environment != 'default':
base_url="http://172.19.42.59:3000"
api_url = f"{base_url}/api/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"


Loading…
취소
저장