[8.1.0][adas] 新增VLLM 接口,新增VLLM图像接口,VLLM数据与VLLM图像创建同一个新线程
This commit is contained in:
@@ -86,6 +86,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCloudTaskL
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerTakeoverListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerVlmManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerCaptureImgManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDiskCopyManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerNDECloudManager
|
||||
@@ -152,6 +153,7 @@ import prediction2025.Prediction2025
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
import vllm.Vlm
|
||||
import java.io.PrintWriter
|
||||
import java.io.StringWriter
|
||||
import kotlin.math.roundToInt
|
||||
@@ -1612,6 +1614,26 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerNDECloudManager.onNdeCloudAdviceAvw(advicePojo,adviceAvwInfo)
|
||||
}
|
||||
|
||||
/**
|
||||
* 视觉语言模型
|
||||
*
|
||||
* @param header 头
|
||||
* @param vllm 数据
|
||||
*/
|
||||
override fun onVllm(header: MessagePad.Header, vllm: Vlm.VLLMObject) {
|
||||
CallerVlmManager.invokeVllm(header.sourceTimestamp, vllm)
|
||||
}
|
||||
|
||||
/**
|
||||
* 视觉语言模型图像
|
||||
*
|
||||
* @param header 头
|
||||
* @param image 数据
|
||||
*/
|
||||
override fun onVllmImage(header: MessagePad.Header, image: ByteArray) {
|
||||
CallerVlmManager.invokeVllmImage(header.sourceTimestamp, image)
|
||||
}
|
||||
|
||||
/**
|
||||
* 域控上报OBU开关状态响应
|
||||
*
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
|
||||
import vllm.Vlm
|
||||
|
||||
/**
|
||||
* 视觉语言模型
|
||||
*/
|
||||
interface IVlmListener {
|
||||
|
||||
|
||||
/**
|
||||
* 视觉语言模型数据
|
||||
*
|
||||
* @param sourceTimestamp 数据源时间戳 vlm数据与vlm图像的数据源时间戳完全一致则表示为同一条数据
|
||||
* @param vllm 数据
|
||||
*/
|
||||
fun onVllm(sourceTimestamp: Double, vllm: Vlm.VLLMObject)
|
||||
|
||||
/**
|
||||
* 视觉语言模型图像
|
||||
*
|
||||
* @param sourceTimestamp 数据源时间戳 vlm数据与vlm图像的数据源时间戳完全一致则表示为同一条数据
|
||||
* @param image 数据
|
||||
*/
|
||||
fun onVllmImage(sourceTimestamp: Double, image: ByteArray)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IVlmListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import vllm.Vlm
|
||||
|
||||
/**
|
||||
* 视觉语言模型
|
||||
*/
|
||||
object CallerVlmManager : CallerBase<IVlmListener>() {
|
||||
|
||||
|
||||
fun invokeVllm(sourceTimestamp: Double, vllm: Vlm.VLLMObject) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onVllm(sourceTimestamp, vllm)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeVllmImage(sourceTimestamp: Double, image: ByteArray) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onVllmImage(sourceTimestamp, image)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user