phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

[BUG] Failed to export batch code: 405, reason: Method Not Allowed

Open taoari opened this issue 1 year ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. docker compose up allowing https://docs.arize.com/phoenix/deployment/docker
  2. run the following script (from https://docs.arize.com/phoenix/tracing/integrations-tracing/langchain):
from phoenix.otel import register

tracer_provider = register(
  project_name="my-llm-app", # Default is 'default'
  endpoint="http://localhost:6006",
)

from openinference.instrumentation.langchain import LangChainInstrumentor

LangChainInstrumentor().instrument(tracer_provider=tracer_provider)

from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI

prompt = ChatPromptTemplate.from_template("{x} {y} {z}?").partial(x="why is", z="blue")
chain = prompt | ChatOpenAI(model_name="gpt-3.5-turbo")
print(chain.invoke(dict(y="sky")))

and got the following errors:

Failed to export batch code: 405, reason: Method Not Allowed Failed to export batch code: 405, reason: Method Not Allowed Failed to export batch code: 405, reason: Method Not Allowed

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. MacOS]
  • Notebook Runtime [e.g. Jupyter, Colab]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 0.0.1]

Additional context Add any other context about the problem here (e.x. a link to a colab)

taoari avatar Sep 05 '24 21:09 taoari

hey @taoari - it should be

tracer_provider = register(
  project_name="my-llm-app", # Default is 'default'
  endpoint="http://localhost:6006/v1/traces",
)

the route for HTTP is /v1/traces slug. Can you try this?

mikeldking avatar Sep 06 '24 17:09 mikeldking

it works with /v1/traces. 👍🏻 Maybe soemone can change here: https://docs.arize.com/phoenix/tracing/integrations-tracing/langchain in the docker tab and command line. Thank you! :).

mfmezger avatar Oct 08 '24 10:10 mfmezger

@mikeldking Thank you! I believe the issue stems from an error in the document. It would be great if it could be corrected.

taoari avatar Oct 08 '24 23:10 taoari

Ah good catch will fix.

Cc @Jgilhuly

mikeldking avatar Oct 13 '24 05:10 mikeldking