Skip to content

Instantly share code, notes, and snippets.

View thoraxe's full-sized avatar

Erik Jacobs thoraxe

View GitHub Profile
inference> I'll help you get a list of all available Prometheus metrics. Let me retrieve that information for you.get_prometheus_metrics(get_prometheus_metrics({})
tool_execution> Tool:get_prometheus_metrics Args:{}
tool_execution> Tool:get_prometheus_metrics Response:Unknown tool `get_prometheus_metrics` was called.
@thoraxe
thoraxe / client.py
Last active February 24, 2025 16:59
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import asyncio
import os
import subprocess
import fire
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import asyncio
import os
import fire
python e2e.py localhost 5000
No available shields. Disable safety.
Using model: meta-llama/Llama-3.2-1B-Instruct
Created session_id=f077f8c3-4f01-413f-8389-1ac61d79c60a for Agent(793512c3-4740-4bea-861b-f11daf82f307)
inference> Traceback (most recent call last):
File "/home/thoraxe/Red_Hat/openshift/llamaindex-experiments/ols-llamastack/e2e.py", line 93, in <module>
fire.Fire(main)
File "/home/thoraxe/.pyenv/versions/ols-llamastack/lib/python3.11/site-packages/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python client.py localhost 5000 "what pods are int he openshift-lightspeed namespace?"
No available shields. Disable safety.
Created session_id=32feb5bb-c1eb-4a2e-92b1-5f548b55812e for Agent(453bd9b5-53d1-4f13-82c0-5cfee5b826ef)
inference> tool_call>Traceback (most recent call last):
File "/home/thoraxe/.pyenv/versions/ols-llamastack/lib/python3.11/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
yield
File "/home/thoraxe/.pyenv/versions/ols-llamastack/lib/python3.11/site-packages/httpx/_transports/default.py", line 116, in __iter__
for part in self._httpcore_stream:
File "/home/thoraxe/.pyenv/versions/ols-llamastack/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 407, in __iter__
raise exc from None
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import asyncio
import os
import subprocess
import fire
import asyncio
import logging
import json
import subprocess
from dataclasses import dataclass
from devtools import pprint
import colorlog
import httpx
python main.py
----START----
INFO:autogen_core:Sending message of type GroupChatStart to group_chat_manager: {'message': TextMessage(source='user', models_usage=None, content='What pods are in the namespace openshift-lightspeed?', type='TextMessage')}
INFO:autogen_core:Calling message handler for group_chat_manager/59a8b872-f3ae-4bef-b591-dbf0ce08f46d with message type GroupChatStart sent by Unknown
INFO:autogen_core:Publishing message of type GroupChatStart to all subscribers: {'message': TextMessage(source='user', models_usage=None, content='What pods are in the namespace openshift-lightspeed?', type='TextMessage')}
INFO:autogen_core:Publishing message of type GroupChatStart to all subscribers: {'message': TextMessage(source='user', models_usage=None, content='What pods are in the namespace openshift-lightspeed?', type='TextMessage')}
INFO:autogen_core:Calling message handler for collect_output_messages with message type GroupChatStart published by group_chat_manager/59a8b872-f3ae-4bef-b591-dbf0ce08f46d
IN
import asyncio
import gradio as gr
import logging
import random
import subprocess
import os
from typing import AsyncIterator
from autogen_agentchat.agents import AssistantAgent
@thoraxe
thoraxe / lightspeed-catalogsource.yaml
Created June 24, 2024 18:27
OpenShift Lightspeed CatalogSource object
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: openshift-lightspeed-operator-catalog
namespace: openshift-marketplace
spec:
displayName: OpenShift Lightspeed
sourceType: grpc
image: quay.io/openshift-lightspeed/lightspeed-catalog:alpha-0.0.2
updateStrategy: