model_version="0.1", verbose=False)urls = ["https://lilianweng.github.io/posts/2023-06-23-agent/",        "https://medium.com/lyft-engineering/lyftlearn-ml-model-training-infrastructure-built-on-kubernetes-aef8218842bb",        "https://blog.langchain.dev/week-of-10-2-langchain-release-notes/"]for url in urls:    loader = WebBaseLoader(url)    docs = loader.load()    llm = ChatOpenAI(temperature=0, model_name="gpt-3.5-turbo-16k", callbacks=[handler])    chain = load_summarize_chain(llm, chain_type="stuff", verbose=False)    chain.run(docs)Create Metric Charts‚Äãresponse = client.search_ts("__name__", "latency", 0, int(time.time()))plot(response.text, "Latency")response = client.search_ts("__name__", "error", 0, int(time.time()))plot(response.text, "Errors")response = client.search_ts("__name__", "prompt_tokens", 0, int(time.time()))plot(response.text, "Prompt Tokens")response = client.search_ts("__name__", "completion_tokens", 0, int(time.time()))plot(response.text, "Completion Tokens")    ![png](_infino_files/output_18_0.png)        ![png](_infino_files/output_18_1.png)        ![png](_infino_files/output_18_2.png)        ![png](_infino_files/output_18_3.png)    ## Full text query on prompt or prompt outputs# Search for a particular prompt text.query = "machine learning"response = client.search_log(query, 0, int(time.time()))# The output can be verbose - uncomment below if it needs to be printed.# print("Results for", query, ":", response.text)print("===")    ===## Stop Infino serverdocker rm -f infino-example    infino-examplePreviousContextNextLabel StudioInitializingStart Infino server, initialize the Infino clientRead the questions datasetExample 1: LangChain OpenAI Q&A; Publish metrics and logs to InfinoCreate Metric ChartsFull text query on prompt or prompt outputs.Create Metric ChartsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This example shows how one can track the following while calling OpenAI and ChatOpenAI models via LangChain and Infino:
This example shows how one can track the following while calling OpenAI and ChatOpenAI models via LangChain and Infino: ->: model_version="0.1", verbose=False)urls = ["https://lilianweng.github.io/posts/2023-06-23-agent/",        "https://medium.com/lyft-engineering/lyftlearn-ml-model-training-infrastructure-built-on-kubernetes-aef8218842bb",        "https://blog.langchain.dev/week-of-10-2-langchain-release-notes/"]for url in urls:    loader = WebBaseLoader(url)    docs = loader.load()    llm = ChatOpenAI(temperature=0, model_name="gpt-3.5-turbo-16k", callbacks=[handler])    chain = load_summarize_chain(llm, chain_type="stuff", verbose=False)    chain.run(docs)Create Metric Charts‚Äãresponse = client.search_ts("__name__", "latency", 0, int(time.time()))plot(response.text, "Latency")response = client.search_ts("__name__", "error", 0, int(time.time()))plot(response.text, "Errors")response = client.search_ts("__name__", "prompt_tokens", 0, int(time.time()))plot(response.text, "Prompt Tokens")response = client.search_ts("__name__", "completion_tokens", 0, int(time.time()))plot(response.text, "Completion Tokens")    ![png](_infino_files/output_18_0.png)        ![png](_infino_files/output_18_1.png)        ![png](_infino_files/output_18_2.png)        ![png](_infino_files/output_18_3.png)    ## Full text query on prompt or prompt outputs# Search for a particular prompt text.query = "machine learning"response = client.search_log(query, 0, int(time.time()))# The output can be verbose - uncomment below if it needs to be printed.# print("Results for", query, ":", response.text)print("===")    ===## Stop Infino serverdocker rm -f infino-example    infino-examplePreviousContextNextLabel StudioInitializingStart Infino server, initialize the Infino clientRead the questions datasetExample 1: LangChain OpenAI Q&A; Publish metrics and logs to InfinoCreate Metric ChartsFull text query on prompt or prompt outputs.Create Metric ChartsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.