mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-07 19:38:00 +02:00
remove useless code
This commit is contained in:
@@ -10,7 +10,6 @@ IGNORED_HEADERS = [
|
||||
"x-forwarded-proto",
|
||||
"x-forwarded-server",
|
||||
"x-real-ip",
|
||||
"content-length"
|
||||
]
|
||||
|
||||
CLIENT_TIMEOUT = 60.0
|
||||
|
||||
@@ -6,8 +6,8 @@ up() {
|
||||
# Start your local docker-compose services
|
||||
docker compose -f docker-compose.local.yml up -d
|
||||
|
||||
echo "Proxy started at http://localhost/api/v1/proxy/"
|
||||
echo "See http://localhost/api/v1/proxy/docs for API documentation"
|
||||
echo "Proxy started at http://localhost:8005/api/v1/proxy/"
|
||||
echo "See http://localhost:8005/api/v1/proxy/docs for API documentation"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
@@ -45,10 +45,6 @@ class WeatherAgent:
|
||||
},
|
||||
}
|
||||
|
||||
# self.system_prompt = """You are an assistant that can perform weather searches using function calls.
|
||||
# When a user asks for weather information, respond with a JSON object specifying
|
||||
# the function name `get_weather` and the arguments latitude and longitude are needed."""
|
||||
|
||||
def get_response(self, user_query: str) -> Dict:
|
||||
"""
|
||||
Get the response from the agent for a given user query for weather.
|
||||
@@ -57,7 +53,6 @@ class WeatherAgent:
|
||||
response_list = []
|
||||
while True:
|
||||
response = self.client.messages.create(
|
||||
# system=self.system_prompt,
|
||||
tools=[self.get_weather_function],
|
||||
model="claude-3-5-sonnet-20241022",
|
||||
max_tokens=1024,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import anthropic
|
||||
import os
|
||||
from httpx import Client
|
||||
# from invariant import testing
|
||||
import datetime
|
||||
import pytest
|
||||
import sys
|
||||
@@ -35,7 +34,6 @@ async def test_chat_completion_without_streaming(
|
||||
responses = []
|
||||
for query in queries:
|
||||
response = client.messages.create(
|
||||
# system=self.system_prompt,
|
||||
model="claude-3-5-sonnet-20241022",
|
||||
max_tokens=1024,
|
||||
messages=[{"role": "user", "content": query}],
|
||||
|
||||
@@ -204,7 +204,6 @@ async def test_chat_completion_with_tool_call_with_streaming(
|
||||
model="gpt-4o", messages=history, stream=True
|
||||
)
|
||||
final_response = {"role": "assistant", "content": ""}
|
||||
attempt = 0
|
||||
|
||||
for chunk in chat_response_final:
|
||||
if chunk.choices and chunk.choices[0].delta.content:
|
||||
|
||||
@@ -6,7 +6,6 @@ import uuid
|
||||
|
||||
import pytest
|
||||
from httpx import Client
|
||||
import httpx
|
||||
# add tests folder (parent) to sys.path
|
||||
from openai import OpenAI
|
||||
|
||||
|
||||
Reference in New Issue
Block a user