Hi I am trying to get the model name for the chat completion Now using the graphql I am not finding ways to get the correct way to retrieve the model name The task is to calculate the total cost for the completion based on the prompts and model the query goes like this: query ProjectChatCompletionModelNames($id: ID!) { project: node(id: $id) { ... on Project { spans(first: 2) { edges { node { id name metadata attributes tokenCountPrompt tokenCountCompletion tokenCountTotal cumulativeTokenCountTotal propagatedStatusCode } } } } } } For testing I am retrieving the only first 2 values but for production I have around 1000's of data and attributes field has the llm.model_name and I am trying to retrieve the model name only from attributes but could not find any. Also I could get the model name using dictionary on my client side rendering like using python but the problem being for retrieving 1000's of data it takes time so querying directly the model should help retrieving the data faster. Anyone could help me if not this way then other way around. Thanks for replying 😇
Thanks
Ok I will test this again
Hi 🔒[private user] Tried with the endpoint "http://localhost:6006" but no luck Still gets the same error
But now I got an error like this: ERROR:opentelemetry.sdk.trace.export:Exception while exporting Span. Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 497, in _make_request conn.request( File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 395, in request self.endheaders() File "/usr/lib/python3.12/http/client.py", line 1331, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.12/http/client.py", line 1091, in _send_output self.send(msg) File "/usr/lib/python3.12/http/client.py", line 1035, in send self.connect() File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 243, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x727c19cacef0>: Failed to establish a new connection: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='0.0.0.0', port=6006): Max retries exceeded with url: /v1/traces (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x727c19cacef0>: Failed to establish a new connection: [Errno 111] Connection refused')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py", line 139, in _export resp = self._session.post( ^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=6006): Max retries exceeded with url: /v1/traces (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x727c19cacef0>: Failed to establish a new connection: [Errno 111] Connection refused')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 497, in _make_request conn.request( File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 395, in request self.endheaders() File "/usr/lib/python3.12/http/client.py", line 1331, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.12/http/client.py", line 1091, in _send_output self.send(msg) File "/usr/lib/python3.12/http/client.py", line 1035, in send self.connect() File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 243, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x727c19cad5e0>: Failed to establish a new connection: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='0.0.0.0', port=6006): Max retries exceeded with url: /v1/traces (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x727c19cad5e0>: Failed to establish a new connection: [Errno 111] Connection refused')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/opentelemetry/sdk/trace/export/init.py", line 109, in on_end self.span_exporter.export((span,)) File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py", line 204, in export return self._export_serialized_spans(serialized_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py", line 174, in _export_serialized_spans resp = self._export(serialized_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py", line 147, in _export resp = self._session.post( ^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sdlcuser/guardrails-agents/myenv/lib/python3.12/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=6006): Max retries exceeded with url: /v1/traces (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x727c19cad5e0>: Failed to establish a new connection: [Errno 111] Connection refused')) Any solution to this error??
👋 Hello, team! I am a new user at phoenix. I tried the phoenix hosted version and was able to log spans and traces of my llm applicaiton. Now I want to test with the docker version locally I have started the phoenix instance in docker using docker compose file. Now with the configuration added to the llm application with values changed to log traces I get connection time out error as connection not established. Phoenix has started as container with these details as I added below: phoenix-1 | --------------------------- phoenix-1 | ✅ Migrations completed in 0.058 seconds. phoenix-1 | INFO: Started server process [1] phoenix-1 | INFO: Waiting for application startup. phoenix-1 | phoenix-1 | phoenix-1 | ██████╗ ██╗ ██╗ ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗ phoenix-1 | ██╔══██╗██║ ██║██╔═══██╗██╔════╝████╗ ██║██║╚██╗██╔╝ phoenix-1 | ██████╔╝███████║██║ ██║█████╗ ██╔██╗ ██║██║ ╚███╔╝ phoenix-1 | ██╔═══╝ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║██║ ██╔██╗ phoenix-1 | ██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║██║██╔╝ ██╗ phoenix-1 | ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ v10.12.0 phoenix-1 | phoenix-1 | | phoenix-1 | | 🌎 Join our Community 🌎 phoenix-1 | | https://arize-ai.slack.com/join/shared_invite/zt-2w57bhem8-hq24MB6u7yE_ZF_ilOYSBw#/shared-invite/email phoenix-1 | | phoenix-1 | | ⭐️ Leave us a Star ⭐️ phoenix-1 | | https://github.com/Arize-ai/phoenix phoenix-1 | | phoenix-1 | | 📚 Documentation 📚 phoenix-1 | | https://arize.com/docs/phoenix phoenix-1 | | phoenix-1 | | 🚀 Phoenix Server 🚀 phoenix-1 | | Phoenix UI: http://0.0.0.0:6006 phoenix-1 | | phoenix-1 | | Authentication: False phoenix-1 | | Log traces: phoenix-1 | | - gRPC: http://0.0.0.0:4317 phoenix-1 | | - HTTP: http://0.0.0.0:6006/v1/traces phoenix-1 | | Storage: postgresql://postgres:***@db:5432/postgres phoenix-1 | INFO: Application startup complete. phoenix-1 | INFO: Uvicorn running on http://0.0.0.0:6006 (Press CTRL+C to quit) The configuration that I am using for llm application locally is this: from phoenix.otel import register import os os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "http://0.0.0.0:6006" tracer_provider = register( project_name="req_business_requirements_synthesizer_agent", endpoint="http://0.0.0.0:6006/v1/traces", auto_instrument=True, set_global_tracer_provider=False ) Now the application has also started with the tracing in phoenix as what the terminal text says: INFO:phoenix.config:📋 Ensuring phoenix working directory: /home/sdlcuser/.phoenix INFO:phoenix.inferences.inferences:Dataset: phoenix_inferences_61730e64-bed2-4e68-ad68-34af7b661b44 initialized 🔭 OpenTelemetry Tracing Details 🔭 | Phoenix Project: req_business_requirements_synthesizer_agent | Span Processor: SimpleSpanProcessor | Collector Endpoint: http://0.0.0.0:6006/v1/traces | Transport: HTTP + protobuf | Transport Headers: {} | | Using a default SpanProcessor. add_span_processor will overwrite this default. | | ⚠️ WARNING: It is strongly advised to use a BatchSpanProcessor in production environments. Note: The error I add in follow up message
