Real-Time Function Update

I’m trying to add some sort of callback that would allow me to update my function call input data to change a currently running Bokeh plot accordingly in

from import output_file,show
from bokeh.driving import count
from bokeh.server.server import Server
from bokeh.models import ColumnDataSource, HoverTool, Button, Label
from bokeh.plotting import curdoc, figure
from bokeh.client import push_session
import math
import time

def parameters(a,b,c,d):
    def sinusoid(doc):
            source = ColumnDataSource({"x": [], "y": []})
            sinPlot = figure(x_range=(1,10),plot_width=700)
            sinPlot.line("x", "y", source=source) 
            def update(t):
                t =(time.time()-t_initial)*3
                test={'x':[t], 'y':[a*math.sin(b*t+c)+d]}

            print("Function runs")
    server = Server({'/': sinusoid}, num_procs=1)
    server.io_loop.add_callback(, "/")

The plan is to call rtt.parameters(1,1,0,1) , have it plot accordingly, then add a callback or call rtt.parameters(1,2,3,4) again with different inputs (such as updating a,b,c,d). Hopefully this would update the plot that is currently graphing.
Is this possible with Bokeh imported as a library?

Hi @Stoze please edit your post to use code formatting so that the code is intelligible (either with the </> icon on the editing toolbar, or triple backtick ``` fences around the code blocks)

Apologies for wrong formatting. Should be fixed now!