wangdongxu

Merge branch 'develop_fifa_2026_replay_match' of ssh://gitlab.cmvideo.cn:7999/pr…

…oduction_capacity/clip/aigc-group/aigc-embedding-service into develop_fifa_2026_replay_match

# Conflicts:
#	src/football_replay_match/cfg/config.prod.yaml
#	src/football_replay_match/core/api.py
#	src/football_replay_match/core/llm_image.py
@@ -21,8 +21,8 @@ output_kafka: @@ -21,8 +21,8 @@ output_kafka:
21 password: ${kafka_password} 21 password: ${kafka_password}
22 22
23 llm: 23 llm:
24 - base_url: http://192.168.1.59:11434  
25 - model_name: qwen3.6:35b-a3b-q8_0 24 + base_url: http://192.168.1.59:11434/v1
  25 + model_name: Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf
26 temperature: 0.7 26 temperature: 0.7
27 27
28 common: 28 common:
@@ -3,7 +3,7 @@ import os.path @@ -3,7 +3,7 @@ import os.path
3 from pathlib import Path 3 from pathlib import Path
4 4
5 from langchain_core.messages import SystemMessage, HumanMessage 5 from langchain_core.messages import SystemMessage, HumanMessage
6 -from langchain_ollama import ChatOllama 6 +from langchain_openai import ChatOpenAI
7 7
8 try: 8 try:
9 from .llm_video_content import contents as video_contents 9 from .llm_video_content import contents as video_contents
@@ -79,7 +79,8 @@ class FootballReplayMatchLive: @@ -79,7 +79,8 @@ class FootballReplayMatchLive:
79 # keep_alive=-1, reasoning=False) 79 # keep_alive=-1, reasoning=False)
80 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7, 80 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7,
81 # api_key='no_key') 81 # api_key='no_key')
82 - self.model = ChatOllama(base_url=base_url, model=model, temperature=temperature, keep_alive=-1, reasoning=False) 82 + self.model = ChatOpenAI(base_url=base_url, model=model, temperature=temperature, api_key=api_key,
  83 + extra_body={"chat_template_kwargs": {"enable_thinking": False}})
83 84
84 def _match_once(self, replay_video_contents: list, live_videos: list[dict], cache_path=None, record: list = None): 85 def _match_once(self, replay_video_contents: list, live_videos: list[dict], cache_path=None, record: list = None):
85 86
@@ -3,7 +3,7 @@ import os.path @@ -3,7 +3,7 @@ import os.path
3 from pathlib import Path 3 from pathlib import Path
4 4
5 from langchain_core.messages import SystemMessage, HumanMessage 5 from langchain_core.messages import SystemMessage, HumanMessage
6 -from langchain_ollama import ChatOllama 6 +from langchain_openai import ChatOpenAI
7 7
8 try: 8 try:
9 from .llm_video_content import contents as video_contents 9 from .llm_video_content import contents as video_contents
@@ -74,7 +74,8 @@ class FootballReplayVideoEvent: @@ -74,7 +74,8 @@ class FootballReplayVideoEvent:
74 # keep_alive=-1, reasoning=False) 74 # keep_alive=-1, reasoning=False)
75 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7, 75 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7,
76 # api_key='no_key') 76 # api_key='no_key')
77 - self.model = ChatOllama(base_url=base_url, model=model, temperature=temperature, keep_alive=-1, reasoning=False) 77 + self.model = ChatOpenAI(base_url=base_url, model=model, temperature=temperature, api_key=api_key,
  78 + extra_body={"chat_template_kwargs": {"enable_thinking": False}})
78 79
79 def video_event(self, video_path: str, asr_text: str = '无', cache_path=None): 80 def video_event(self, video_path: str, asr_text: str = '无', cache_path=None):
80 if cache_path is not None and os.path.exists(cache_path): 81 if cache_path is not None and os.path.exists(cache_path):
@@ -6,9 +6,9 @@ import json @@ -6,9 +6,9 @@ import json
6 6
7 7
8 def batch_match(): 8 def batch_match():
9 - replay_match_live = FootballReplayMatchLive(base_url="http://192.168.1.59:11434", model="qwen3.6:35b-a3b-q8_0") 9 + replay_match_live = FootballReplayMatchLive(base_url="http://192.168.1.59:11434/v1", model="Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf")
10 qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B") 10 qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B")
11 - fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434", model="qwen3.6:35b-a3b-q8_0", temperature=0.7) 11 + fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434/v1", model="Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf", temperature=0.7)
12 12
13 videos_dir = rf"R:\wdx\202604\20260420_download_football_video\finished" 13 videos_dir = rf"R:\wdx\202604\20260420_download_football_video\finished"
14 for video_name in sorted(os.listdir(videos_dir)): 14 for video_name in sorted(os.listdir(videos_dir)):
@@ -4,7 +4,7 @@ import os @@ -4,7 +4,7 @@ import os
4 from football_replay_video_event_by_llm import FootballReplayVideoEvent 4 from football_replay_video_event_by_llm import FootballReplayVideoEvent
5 from qwen_asr_util import QwenAsr 5 from qwen_asr_util import QwenAsr
6 def batch_with_asr(): 6 def batch_with_asr():
7 - fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434", model="qwen3.6:35b-a3b-q8_0", temperature=0.7) 7 + fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434/v1", model="Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf", temperature=0.7)
8 qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B",temperature=0.7, 8 qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B",temperature=0.7,
9 api_key='no_key') 9 api_key='no_key')
10 10
@@ -27,7 +27,7 @@ def batch_with_asr(): @@ -27,7 +27,7 @@ def batch_with_asr():
27 print(event_json) 27 print(event_json)
28 28
29 def batch_without_asr(): 29 def batch_without_asr():
30 - fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434", model="qwen3.6:35b-a3b-q8_0", temperature=0.7) 30 + fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434/v1", model="Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf", temperature=0.7)
31 # qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B", temperature=0.7, 31 # qwen_asr = QwenAsr(base_url="http://192.168.1.59:8101/v1", model="Qwen/Qwen3-ASR-1.7B", temperature=0.7,
32 # api_key='no_key') 32 # api_key='no_key')
33 33
@@ -51,7 +51,7 @@ def batch_without_asr(): @@ -51,7 +51,7 @@ def batch_without_asr():
51 print(event_json) 51 print(event_json)
52 52
53 def one_video_test(video_path): 53 def one_video_test(video_path):
54 - fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434", model="qwen3.6:35b-a3b-q8_0", temperature=0.7) 54 + fbrv = FootballReplayVideoEvent(base_url="http://192.168.1.59:11434/v1", model="Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf", temperature=0.7)
55 event_json = fbrv.video_event(video_path, None) 55 event_json = fbrv.video_event(video_path, None)
56 print(event_json) 56 print(event_json)
57 57
@@ -3,7 +3,7 @@ import json @@ -3,7 +3,7 @@ import json
3 from pathlib import Path 3 from pathlib import Path
4 4
5 from aabd.base.time_util import vms2str_auto 5 from aabd.base.time_util import vms2str_auto
6 -from langchain_ollama import ChatOllama 6 +from langchain_openai import ChatOpenAI
7 7
8 8
9 class ClipByEvent: 9 class ClipByEvent:
@@ -19,7 +19,7 @@ class ClipByEvent: @@ -19,7 +19,7 @@ class ClipByEvent:
19 # keep_alive=-1, reasoning=False) 19 # keep_alive=-1, reasoning=False)
20 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7, 20 # self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7,
21 # api_key='no_key') 21 # api_key='no_key')
22 - self.model = ChatOllama(base_url=base_url, model=model, temperature=temperature, keep_alive=-1, reasoning=False) 22 + self.model = ChatOpenAI(base_url=base_url, model=model, temperature=temperature, api_key=api_key)
23 23
24 def get_video_match_time(self, video_path, video_time): 24 def get_video_match_time(self, video_path, video_time):
25 import cv2 25 import cv2