Skip to content

Commit

Permalink
Increase request timeout and fix pylint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
basicthinker committed Jun 6, 2023
1 parent 17e47ac commit 2090a06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devchat/openai/openai_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class OpenAIChatConfig(BaseModel):
frequency_penalty: Optional[float] = Field(None, ge=-2.0, le=2.0)
logit_bias: Optional[Dict[int, float]] = Field(None)
user: Optional[str] = Field(None)
request_timeout: Optional[int] = Field(15, ge=3)
request_timeout: Optional[int] = Field(20, ge=3)

class Config:
"""
Expand Down
3 changes: 2 additions & 1 deletion devchat/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def select_prompts(self, start: int, end: int, topic: Optional[str] = None) -> L
"""
if topic:
ancestors = nx.ancestors(self._graph, topic)
nodes_with_data = [(node, self._graph.nodes[node]) for node in ancestors] + [(topic, self._graph.nodes[topic])]
nodes_with_data = [(node, self._graph.nodes[node]) for node in ancestors] + \
[(topic, self._graph.nodes[topic])]
sorted_nodes = sorted(nodes_with_data, key=lambda x: x[1]['timestamp'], reverse=True)
else:
sorted_nodes = sorted(self._graph.nodes(data=True),
Expand Down

0 comments on commit 2090a06

Please sign in to comment.