datetime not supported by openai, changed to string
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ import gradio as gr
|
|
| 4 |
from openai import OpenAI
|
| 5 |
from typing import List, Dict, Any, Optional, Literal, Union
|
| 6 |
from enum import Enum
|
| 7 |
-
from datetime import datetime
|
| 8 |
|
| 9 |
# Chatbot model
|
| 10 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
|
@@ -23,8 +22,8 @@ class Person(BaseModel):
|
|
| 23 |
|
| 24 |
class Interactions(BaseModel):
|
| 25 |
people: List[Person] = Field(..., title="People", description="People involved or mentioned during interaction")
|
| 26 |
-
date:
|
| 27 |
-
nextMeeting:
|
| 28 |
nextSteps: List[str] = Field(..., title="Next Steps", description="List of individual next steps derived from the interaction")
|
| 29 |
summary: str = Field(..., title="Summary", description="Summary of the interaction")
|
| 30 |
|
|
@@ -74,7 +73,7 @@ class Soil(BaseModel):
|
|
| 74 |
|
| 75 |
class Log(BaseModel):
|
| 76 |
convention: List[Convention] = Field(..., title="Logs", description="This log's convention (i.e. this log's category or type)")
|
| 77 |
-
date:
|
| 78 |
description: str = Field(..., title="Description", description="A description of the details of the log (i.e. details about farm activity performed")
|
| 79 |
|
| 80 |
class Planting(BaseModel):
|
|
|
|
| 4 |
from openai import OpenAI
|
| 5 |
from typing import List, Dict, Any, Optional, Literal, Union
|
| 6 |
from enum import Enum
|
|
|
|
| 7 |
|
| 8 |
# Chatbot model
|
| 9 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
|
|
|
| 22 |
|
| 23 |
class Interactions(BaseModel):
|
| 24 |
people: List[Person] = Field(..., title="People", description="People involved or mentioned during interaction")
|
| 25 |
+
date: str = Field(..., title="Date of current interaction", description="Date of the interaction")
|
| 26 |
+
nextMeeting: str = Field(..., title="Date of next meeting", description="Proposed date of the next future interaction")
|
| 27 |
nextSteps: List[str] = Field(..., title="Next Steps", description="List of individual next steps derived from the interaction")
|
| 28 |
summary: str = Field(..., title="Summary", description="Summary of the interaction")
|
| 29 |
|
|
|
|
| 73 |
|
| 74 |
class Log(BaseModel):
|
| 75 |
convention: List[Convention] = Field(..., title="Logs", description="This log's convention (i.e. this log's category or type)")
|
| 76 |
+
date: str = Field(..., title="Date", description="Date the log (i.e. action of the activity or input) was performed")
|
| 77 |
description: str = Field(..., title="Description", description="A description of the details of the log (i.e. details about farm activity performed")
|
| 78 |
|
| 79 |
class Planting(BaseModel):
|