saved the earth
Browse files
app.py
CHANGED
|
@@ -1,53 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
-
from core.llms import LLM
|
| 3 |
-
from dotenv import load_dotenv
|
| 4 |
-
from typing import Annotated, Optional
|
| 5 |
-
# from function_schema import Doc
|
| 6 |
-
from core.llms.utils import user_message_with_images
|
| 7 |
-
|
| 8 |
-
load_dotenv('../.global_env')
|
| 9 |
-
|
| 10 |
-
# def get_weather(
|
| 11 |
-
# city: Annotated[str, "The city to get the weather for"], # <- string value of Annotated is used as a description
|
| 12 |
-
# unit: Annotated[Optional[str], "The unit to return the temperature in"] = "celcius",
|
| 13 |
-
# ) -> str:
|
| 14 |
-
# """Returns the weather for the given city."""
|
| 15 |
-
# return f"Weather for {city} is 20°C"
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
# def get_distance(city1: Annotated[str, 'city to start journey from'], city2: Annotated[str, 'city where journey ends']) -> float:
|
| 19 |
-
# ''' Returns distance between two cities '''
|
| 20 |
-
# return f"{city1} --- {city2}: 10 KM"
|
| 21 |
-
|
| 22 |
-
# tools = {"get_weather": get_weather, 'get_distance':get_distance}
|
| 23 |
-
|
| 24 |
-
# models= [
|
| 25 |
-
# ('gemini/gemini-1.5-flash', 'GEMINI_API_KEY'),
|
| 26 |
-
# ('groq/llava-v1.5-7b-4096-preview', 'GROQ_API_KEY')
|
| 27 |
-
# ]
|
| 28 |
-
|
| 29 |
-
# model , api_key = models[0]
|
| 30 |
-
# api_key = os.getenv(api_key)
|
| 31 |
-
|
| 32 |
-
# llm = LLM(api_key=api_key, model=model)
|
| 33 |
-
|
| 34 |
-
# messages = [
|
| 35 |
-
# {"role": "system", "content": "You are a helpful assistant."},
|
| 36 |
-
# {"role": "user", "content": "Who won the world series in 2020?"},
|
| 37 |
-
# {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
|
| 38 |
-
# # {"role": "user", "content": "whats weather in new york, what is distance between new york and las vegas"},
|
| 39 |
-
# # user_message_with_images(
|
| 40 |
-
# # 'explain this image',
|
| 41 |
-
# # file_path_list = ['./hehe.jpg'],
|
| 42 |
-
# # max_size_px=512,
|
| 43 |
-
|
| 44 |
-
# # )
|
| 45 |
-
|
| 46 |
-
# ]
|
| 47 |
-
|
| 48 |
-
# response = llm.chat(messages)
|
| 49 |
-
|
| 50 |
-
# print('response: ', response)
|
| 51 |
from app.app import main
|
| 52 |
|
| 53 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from app.app import main
|
| 2 |
|
| 3 |
if __name__ == '__main__':
|
sometext.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ten.py
DELETED
|
@@ -1,12 +0,0 @@
|
|
| 1 |
-
from dataclasses import dataclass
|
| 2 |
-
|
| 3 |
-
@dataclass
|
| 4 |
-
class ThoughtSteps:
|
| 5 |
-
step_title:str
|
| 6 |
-
thought:str
|
| 7 |
-
answer:str
|
| 8 |
-
critic:str
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
t = ThoughtSteps(step_title="test", thought="thought", answer="answer", critic="critic")
|
| 12 |
-
print(t)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tt.py
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
import litellm
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
litellm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|