= OpenAI(model_name="text-davinci-003", callbacks=[log10_callback], temperature=0.5)completion = llm.predict("You are a ping pong machine.\nPing?\n")print(completion)You can also intermix direct OpenAI calls and Langchain LLM calls:import osfrom log10.load import log10, log10_sessionimport openaifrom langchain.llms import OpenAIlog10(openai)with log10_session(tags=["foo", "bar"]):    # Log a direct OpenAI call    response = openai.Completion.create(        model="text-ada-001",        prompt="Where is the Eiffel Tower?",        temperature=0,        max_tokens=1024,        top_p=1,        frequency_penalty=0,        presence_penalty=0,    )    print(response)    # Log a call via Langchain    llm = OpenAI(model_name="text-ada-001", temperature=0.5)    response = llm.predict("You are a ping pong machine.\nPing?\n")    print(response)How to debug Langchain calls‚ÄãExample of debuggingMore Langchain examplesPreviousLlama.cppNextMarqoWhat is Log10?Quick startHow to enable Log10 data management for LangchainHow to use tags with Log10How to debug Langchain callsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This page covers how to use the Log10 within LangChain.
This page covers how to use the Log10 within LangChain. ->: = OpenAI(model_name="text-davinci-003", callbacks=[log10_callback], temperature=0.5)completion = llm.predict("You are a ping pong machine.\nPing?\n")print(completion)You can also intermix direct OpenAI calls and Langchain LLM calls:import osfrom log10.load import log10, log10_sessionimport openaifrom langchain.llms import OpenAIlog10(openai)with log10_session(tags=["foo", "bar"]):    # Log a direct OpenAI call    response = openai.Completion.create(        model="text-ada-001",        prompt="Where is the Eiffel Tower?",        temperature=0,        max_tokens=1024,        top_p=1,        frequency_penalty=0,        presence_penalty=0,    )    print(response)    # Log a call via Langchain    llm = OpenAI(model_name="text-ada-001", temperature=0.5)    response = llm.predict("You are a ping pong machine.\nPing?\n")    print(response)How to debug Langchain calls‚ÄãExample of debuggingMore Langchain examplesPreviousLlama.cppNextMarqoWhat is Log10?Quick startHow to enable Log10 data management for LangchainHow to use tags with Log10How to debug Langchain callsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.