remove non-stream client

This commit is contained in:
Adil Hafeez 2024-10-29 11:19:22 -07:00
parent 91df1e7941
commit 893d5fea88
3 changed files with 4 additions and 152 deletions

View file

@ -10,8 +10,6 @@ logging.basicConfig(
log = logging.getLogger(__name__)
ARCH_STATE_HEADER = "x-arch-state"
def process_stream_chunk(chunk, history):
delta = chunk.choices[0].delta
@ -35,22 +33,6 @@ def process_stream_chunk(chunk, history):
return None
def get_arch_messages(response_json):
arch_messages = []
if response_json and "metadata" in response_json:
# load arch_state from metadata
arch_state_str = response_json.get("metadata", {}).get(ARCH_STATE_HEADER, "{}")
# parse arch_state into json object
arch_state = json.loads(arch_state_str)
# load messages from arch_state
arch_messages_str = arch_state.get("messages", "[]")
# parse messages into json object
arch_messages = json.loads(arch_messages_str)
# append messages from arch gateway to history
return arch_messages
return []
def convert_prompt_target_to_openai_format(target):
tool = {
"description": target["description"],